Matplotlib Basemap install issues mac OS

人走茶凉 提交于 2020-04-18 04:41:00

问题


I am trying to install basemap on my Mac. I followed the steps listed here: https://matplotlib.org/basemap/users/installing.html#installation

Everything seemed to go well until I tried to test the install by typing into the python prompt:

>>>from mpl_toolkits.basemap import Basemap 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-
packages/mpl_toolkits/basemap/__init__.py", line 33, in <module>
    from mpl_toolkits.axes_grid1 import make_axes_locatable
ImportError: No module named axes_grid1

I saw another post that suggested updating matplot lib with:

sudo pip install --upgrade matplotlib

I tried that to no avail. Any other suggestions would be greatly appreciated.


回答1:


pip install --upgrade --user matplotlib numpy pyproj pyshp OWSLib Pillow
sudo apt install libgeos-dev
pip install --user --upgrade basemap-1.2.0rel.tar.gz

I have recently used the instructions above to update basemap on Ubuntu 18.04. I am not sure about the equivalent for macOS though. The basemap archive can be downloaded here.



来源:https://stackoverflow.com/questions/52862189/matplotlib-basemap-install-issues-mac-os

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!