简体   繁体   English

Matplotlib Basemap安装问题在Mac OS中

[英]Matplotlib Basemap install issues mac OS

I am trying to install basemap on my Mac. 我正在尝试在Mac上安装底图。 I followed the steps listed here: https://matplotlib.org/basemap/users/installing.html#installation 我遵循此处列出的步骤: 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: 一切似乎都进行得很顺利,直到我尝试通过在python提示符下键入来测试安装:

>>>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: 我看到了另一条建议使用以下内容更新matplot lib的帖子:

sudo pip install --upgrade matplotlib

I tried that to no avail. 我尝试了一下都无济于事。 Any other suggestions would be greatly appreciated. 任何其他建议将不胜感激。

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. 我最近按照上面的说明在Ubuntu 18.04上更新了底图。 I am not sure about the equivalent for macOS though. 我不确定macOS的等效功能。 The basemap archive can be downloaded here . 底图存档可在此处下载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM