官方文档给出需要的依赖:
Basemap Matplotlib Toolkitmatplotlib.org![e34fe2d01cf3fe2fdd539676d931e295.png](https://img-blog.csdnimg.cn/img_convert/e34fe2d01cf3fe2fdd539676d931e295.png)
现在就差proj4和geos.
- 命令处理器中,定位到pip所在的文件夹。使用pip install geos (python的basemap这个库是建立在geos中的)
- 下载pyproj时,可以用pip 但是要注意版本:直接pip下的是最新版,但是basemap中有些可能是用的低版本的pyproj.
我就遇到了这个问题:
I get the errormodule 'pyproj' has no attribute 'pyproj_datadir'
所以在网上找啊找啊,终于被我找到了解决方案:
https://github.com/matplotlib/basemap/issues/457github.com原来版本不对,需要1.9.6的版本
![64986af7af11d12bd71fab28303fecd5.png](https://img-blog.csdnimg.cn/img_convert/64986af7af11d12bd71fab28303fecd5.png)