Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basemap is not found on pip for python3.4? #251

Open
guziy opened this issue Jan 5, 2016 · 25 comments
Open

basemap is not found on pip for python3.4? #251

guziy opened this issue Jan 5, 2016 · 25 comments

Comments

@guziy
Copy link
Contributor

guziy commented Jan 5, 2016

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

@tacaswell
Copy link
Member

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

@guziy
Copy link
Contributor Author

guziy commented Jan 5, 2016

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

2016-01-04 23:36 GMT-05:00 Thomas A Caswell notifications@github.com:

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
#251 (comment).

Sasha

@tacaswell
Copy link
Member

Interesting. I am also seeing the same issue.

@jenshnielsen
Copy link
Member

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.

@guziy
Copy link
Contributor Author

guziy commented Jan 5, 2016

@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

@jenshnielsen
Copy link
Member

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

@aeroevan
Copy link

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.

@ghost
Copy link

ghost commented May 18, 2016

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

fuentesfranco pushed a commit to kyklop-climate/kyklop that referenced this issue Jun 24, 2016
Basemap can at the moment apparently not be installed easily via pip.
(see matplotlib/basemap#251 and matplotlib/basemap#198)

Signed-off-by: Ramon Fuentes Franco <rfuentes@ictp.it>
erthward added a commit to dlab-geo/geopandas_ws that referenced this issue Dec 8, 2016
…o have fixed most pip fails, but basemap apparently pip install by default any longer because a.) it is too large to be hosted on PyPi, so it is hosted on its own server, and b.) pip install changed its defaults to no longer include to --allow-external flag. So I am trying to insert the url to an archived version of the packge from its Github repo, instead, per suggestion on matplotlib/basemap#251. We'll see if this worked.
@danielsenhwong
Copy link

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: #343

@ojdo
Copy link

ojdo commented Jun 19, 2017

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.

@Kamik423
Copy link

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

@guziy
Copy link
Contributor Author

guziy commented Jun 26, 2017

@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

@Kamik423
Copy link

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

@guziy
Copy link
Contributor Author

guziy commented Jun 26, 2017

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

@Kamik423
Copy link

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

@adesorme
Copy link

adesorme commented Jan 18, 2018

@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

@mdrmuhaimin
Copy link

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

@mikkokotila
Copy link

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?

@aeroevan
Copy link

aeroevan commented May 1, 2018

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

@shaybensasson
Copy link

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

@fjansson fjansson mentioned this issue Jul 16, 2018
@softhearthaspower
Copy link

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.

@ShaharyarAhmed
Copy link

ShaharyarAhmed commented Sep 6, 2018

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

@chaotic-enigma
Copy link

Not able to install Basemap in Fedora27 for python3

@GavinMoreYoung
Copy link

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

@GavinMoreYoung
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests