basemap icon indicating copy to clipboard operation
basemap copied to clipboard

basemap is not found on pip for python3.4?

Open guziy opened this issue 8 years ago • 25 comments

Hi:

I've recently tried to install basemap using pip on my fedora 23 in py3.4 virtual environment, but:

(py3.4) huziy at thinkpad in ~/Python/Projects/PyNotebooks on master*
$ pip install basemap
Collecting basemap
  Could not find a version that satisfies the requirement basemap (from versions: )
No matching distribution found for basemap
(py3.4) huziy at thinkpad in ~/Python/Projects/PyNotebooks on master*
$ python
Python 3.4.3 (default, Jun 29 2015, 12:16:01) 
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.

Which is weird, since it worked OK before...

Maybe the versions should be specified in the setup.py?

Cheers

guziy avatar Jan 05 '16 02:01 guziy

What do you mean by 'before'? Did it used to work with 3.4 and now it does not?

tacaswell avatar Jan 05 '16 04:01 tacaswell

Yes: I've used it with python3.4 before ...

2016-01-04 23:36 GMT-05:00 Thomas A Caswell [email protected]:

What do you mean by 'before'? Did it used to work with 3.4 and now it does not?

— Reply to this email directly or view it on GitHub https://github.com/matplotlib/basemap/issues/251#issuecomment-168894629.

Sasha

guziy avatar Jan 05 '16 04:01 guziy

Interesting. I am also seeing the same issue.

tacaswell avatar Jan 05 '16 04:01 tacaswell

This is a duplicate of #198 Basemap is to large to be hosted on Pypi so the package is hosted externally and new versions of pip no longer allows that pr default.

jenshnielsen avatar Jan 05 '16 07:01 jenshnielsen

@jenshnielsen: so this stopped working for the recent pip?

$ pip3 install --allow-external basemap --allow-unverified basemap basemap
Collecting basemap
  Could not find a version that satisfies the requirement basemap (from versions: )
No matching distribution found for basemap

guziy avatar Jan 05 '16 13:01 guziy

Im not sure someone may also have removed the links to sourceforge from Pypi

jenshnielsen avatar Jan 05 '16 13:01 jenshnielsen

It looks like allow external was removed from recent versions of pip: http://legacy.python.org/dev/peps/pep-0470/

Something like pip install https://github.com/matplotlib/basemap/archive/v1.0.7rel.tar.gz should work though.

aeroevan avatar Mar 28 '16 15:03 aeroevan

Yes, I can't get PyCharm to install it either. :(

ghost avatar May 18 '16 17:05 ghost

According to the changelog for v1.1.0, basemap might be coming back to pip. https://github.com/matplotlib/basemap/blob/master/Changelog The 1.1.0 release appears to be imminent: https://github.com/matplotlib/basemap/issues/343

danielsenhwong avatar Mar 01 '17 19:03 danielsenhwong

Just as another voice getting an unhelpful response by pip after a sudo -H pip3 install basemap, repeating the solution (by @aeroevan) that worked for me:

sudo -H pip3 install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz

The --allow-external work-around only yielded red deprecation warnings. Beware of missing library dependencies, though: I had to install libgeos++-dev (found via this comment) in addition to the expected libgeos-dev.

ojdo avatar Jun 19 '17 09:06 ojdo

I installed GEOS with pip3 install GEOS and then get this error

    Can't find geos library in standard locations ('/var/root', '/var/root/local', '/usr', '/usr/local', '/sw', '/opt', '/opt/local').
    Please install the corresponding packages using your
    systems software management system (e.g. for Debian Linux do:
    'apt-get install libgeos-3.3.3 libgeos-c1 libgeos-dev' and/or
    set the environment variable GEOS_DIR to point to the location
    where geos is installed (for example, if geos_c.h
    is in /usr/local/include, and libgeos_c is in /usr/local/lib,
    set GEOS_DIR to /usr/local), or edit the setup.py script
    manually and set the variable GEOS_dir (right after the line
    that says "set GEOS_dir manually here".

when using

sudo -H pip3 install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz

so dependency management is still broken

Kamik423 avatar Jun 26 '17 20:06 Kamik423

@Kamik423: You have to compile GEOS or install it using your software manager (smth like "sudo apt install libgeos-dev")... I do not think pip is able to install GEOS library.

Cheers

guziy avatar Jun 26 '17 20:06 guziy

well, pip3 install GEOS does... something...

Kamik423 avatar Jun 26 '17 20:06 Kamik423

There is a geos python package in pip))

geos (0.2.1)                                                 - Map server to view, measure and print maps in a web browserand to display maps as an overlay in google earth.

Probably it installs it and not the C++ library you need.

Cheers

guziy avatar Jun 26 '17 20:06 guziy

ok, got it to work on Mac:

brew install geos
sudo -H pip3 install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz

Kamik423 avatar Jun 27 '17 08:06 Kamik423

@Kamik423 I tried your solution and it looked like it worked, but when I attempt to import I get the following error:

In [1]: from mpl_toolkits.basemap import Basemap --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-6-5e6824321d57> in <module>() ----> 1 from mpl_toolkits.basemap import Basemap /anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py in <module>() 37 import numpy as np 38 import numpy.ma as ma ---> 39 import _geoslib 40 import functools 41

adesorme avatar Jan 18 '18 03:01 adesorme

@adesorme Perhaps pip and anaconda is creating a problem. I installed anaconda and it messes up my basemap and I had to reinstall it.

mdrmuhaimin avatar Feb 14 '18 05:02 mdrmuhaimin

The repo is currently more than 1gb which makes it hard to justify including it as a dependency (which is a shame given how valuable this package is).

Is there something that could be done about this?

mikkokotila avatar Apr 28 '18 11:04 mikkokotila

The thing to do is upgrade to http://scitools.org.uk/cartopy/ :)

aeroevan avatar May 01 '18 01:05 aeroevan

Just managed to install it on ubuntu on my py3 virtualenv: sudo apt-get install libgeos-3.5.0 libgeos-c1v5 libgeos-dev pip install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz

You should verify the latest versions and change the numbers accordingly

shaybensasson avatar Jul 15 '18 08:07 shaybensasson

you can install anaconda in your linux, and change the project interpreter under "/anaconda/bin/python/", it works on my computer. Before that ,I have tried many methods but no sense.

softhearthaspower avatar Aug 01 '18 04:08 softhearthaspower

I installed on ubuntu 18 using following steps:

Step 1: update package listings Step 2: install available/latest versions (type sudo apt-get install libgeos and hit tab to check which version is available) Step 3: install package from archive

sudo apt-get update
sudo apt-get install libgeos-3.6.2 libgeos-c1v5 libgeos-dev
pip3 install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz

ShaharyarAhmed avatar Sep 06 '18 07:09 ShaharyarAhmed

Not able to install Basemap in Fedora27 for python3

chaotic-enigma avatar Jan 11 '19 05:01 chaotic-enigma

i am also see the same issue,i do not know how to do it

GavinMoreYoung avatar Jan 30 '19 10:01 GavinMoreYoung

Enter websit https://www.lfd.uci.edu/~gohlke/pythonlibs/, search Basemap and Pyproj package.

GavinMoreYoung avatar Jan 30 '19 15:01 GavinMoreYoung