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

Failure to install Basemap on linux system #445

Closed
YuHuang3019 opened this issue Dec 18, 2018 · 8 comments
Closed

Failure to install Basemap on linux system #445

YuHuang3019 opened this issue Dec 18, 2018 · 8 comments

Comments

@YuHuang3019
Copy link

Hi all,

I am trying to install Basemap to python3.6.3 on a linux system(stampede2). My account is just a user account and I am not permitted to use command sudo. I created a virtual environment so that I could make modifications. I also set GEOS_DIR, PROJ_DIR to my /home/GEOS and /home/PROJ because the default directory was not permitted to modify.

I mainly followed two websites:
https://matplotlib.org/basemap/users/installing.html https://www.reddit.com/r/learnpython/comments/2b4p71/trouble_installing_basemap/
During the installation, there are warnings like below
warning: no files found matching 'README'
warning: no files found matching 'LICENSE_proj4'
warning: no files found matching 'LICENSE_pyshp'
warning: no files found matching 'lib/mpl_toolkits/basemap/pyproj.py'
warning: no files found matching 'lib/mpl_toolkits/basemap/shapefile.py'
writing manifest file 'lib/basemap.egg-info/SOURCES.txt'
warning: sdist: standard file not found: should have one of README, README.rst, README.txt

When trying to use Basemap, I always have the problem of missing module _geoslib even though it seems that the basemap1.2.0 is installed. I tried to locate the path of the module and import with path clarified but I cannot find path too. I guess the missing of a few files caused this problem to occur but I have no idea how to fix it.

I am wondering whether you can help me to add the missing files. Or can anyone here give me a complete instruction about how to install Basemap correctly on a linux system?

Thanks!

@Mayson12381
Copy link

same issue

@GrandH2O
Copy link

same to me, can you help me? @YuHuang3019

@barronh
Copy link
Contributor

barronh commented Mar 23, 2020

FYI - I get the same error using python setup.py install, but it works if I use pip install .

@pesekon2
Copy link
Contributor

pesekon2 commented Mar 25, 2020

FYI - I get the same error using python setup.py install, but it works if I use pip install .

The same worked for me. On Debian 10 with Python 3.7, it worked with normal python3 setup.py install, on CentOS 8 with Python 3.8 (otherwise the same versions of matplotlib, etc.), it worked only when installing using python3.8 -m pip install .

@Roland-Pfeiffer
Copy link

Roland-Pfeiffer commented Feb 20, 2021

I have the same issue.
Sorry if this is a stupid question, but what do you mean with "if I use pip install", @barronh ?
Do you mean running
pip install setup.py
Thank you!

@molinav
Copy link
Member

molinav commented Feb 20, 2021

Hi @KaterFindus! It means that you have to run pip install . (with the dot at the end) from the folder in which the setup.py file resides.

@Roland-Pfeiffer
Copy link

Wow, thank you so much for the quick response, @molinav !
It works now, you're a life saver! :)

@molinav
Copy link
Member

molinav commented Dec 29, 2021

Precompiled wheels are available in PyPI since release 1.3.0. This means that you can now install directly using pip without the need of building the library yourself:

python -m pip install basemap

If you need the high-resolution data files, you have to install basemap-data-hires in addition:

python -m pip install basemap-data-hires

Hope this helps.

@molinav molinav closed this as completed Dec 29, 2021
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

7 participants