-
Notifications
You must be signed in to change notification settings - Fork 394
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
Add installation instructions for pip #433
Conversation
Several issues report problems with using `pip install basemap`. A workaround is using the latest version from Github. Some issues with pip problems:
README.md
Outdated
pip install git+https://github.com/matplotlib/basemap.git | ||
``` | ||
|
||
You migh want to run pip with administrative privilegies (e.g. `sudo pip`) or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should encourage sudo pip
. Let's only promote the --user
option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install from the Git repositories work on MacOS Mojave with Python 3.7 and pipenv and/or pip.
Reference: https://stackoverflow.com/questions/51963619/pyproj-fails-to-compile-when-i-pip-install-it-and-its-not-about-gcc
- With
pipenv
$ pipenv install cython
$ pipenv install git+https://github.com/jswhit/pyproj.git#egg=pyproj
$ pipenv install git+https://github.com/matplotlib/basemap.git
- With just
pip
:
$ pip install -U cython
$ pip install -U git+https://github.com/jswhit/pyproj.git#egg=pyproj
$ pip install -U git+https://github.com/matplotlib/basemap.git
Updated with @phobson suggestion. |
Does this method work in a clean environment? How does it handle the libgeos stuff? To be honest, I'd rather promote the conda-forge approach to installing basemap. Or, even better, |
Assuming you have pyproj installed, the pip command works. pyproj also has a What is the advantage of conda-forge? IMHO, having several package managers is a nightmare. A quick browser in coda's documentation showed me that most packages I use are not available there. And they are in pip. |
Ideally we should start building wheels for
It is a collective of packages (5508) managed openly by the community: https://anaconda.org/conda-forge/repo
Indeed. That is why people are moving to
Not sure what you are using but take a look at the |
Oh, Basemap is being deprecated?
I submitted a PR there with instruction to |
See the @WeatherGod's (the basemap maintainer) #433 (comment) and the EOL docs: https://matplotlib.org/basemap/users/intro.html#cartopy-new-management-and-eol-announcement
pip install from github and expecting to have the libs and compilers is too advanced for the average user. Building wheels are not that hard with the new technologies, but unfortunately that is up to the PyPI package authors/maintainers and many do not have the time to do that. That is why |
I can't say whether conda-forge is better, but there are a lot of packages using (my) https://github.com/matthew-brett/multibuild framework for wheel building. It's not completely trivial, but it's not that hard either. I'd guess about 3 -4 hours for the initial setup. |
I agree. Even though is a matter of copying and pasting, it's too advanced for the average user. Expecting them to read the [f] manual is not compatible with the reality :/ Learned that the hard way.
I was not aware of cartopy when I started a project, will see how difficult it is to adapt to it. I suggest to add a line in the README and in the documentation about this. So if someone finds Basemap in Google or somewhere else, they'll know that this project is at the end of life... But while |
I solved this by uninstalling the conda and reinstalling, defining on installation the conda path on variable environment. After, at settings on your project, set the project interpreter to C:\Users\the_user_name\anaconda3\python.exe, then try to install the basemap. It was the only way I got this, after many tries and bugs with pip I tried with conda and that's it. |
Several issues report problems with using
pip install basemap
. A workaround is using the latest version from Github.Some issues with pip problems: #405 #403 #198 #251