按照此页面中的说明,我下载了基础图及其依赖项。当我运行
时sudo apt-get安装python-mpltoolkits.basemap
它给我以下输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-mpltoolkits.basemap is already the newest version (1.0.7+dfsg-3build2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
的同一件事sudo apt-get安装python-matplotlib
但是在示例文件夹中运行SimpleTest.py,给我以下错误:
Traceback (most recent call last):
File "simpletest.py", line 1, in <module>
from mpl_toolkits.basemap import Basemap
ImportError: No module named basemap
我还尝试了其他方法描述了从源安装的同一页面,但输出相同。我在ubuntu16.04 lts上运行。任何想法!
如果您使用的是anaconda,则具有basemap的软件包: conda安装basemap