basemap是python下绘制地图不错的数据绘制包,基于numpy的数组运算功能,可谓py下的神器。
由于basemap是matplotlib的子库,因此安装basemap,首先要安装matplotlib和numpy
在unofficial python库网站找到matplotlib和numpy for python27+amd64的whl,然后用pip install 安装。
然后在安装basemap之前,还要pip install geos
最后在上述网站找到basemap‑1.1.0‑cp27‑cp27m‑win_amd64.whl
现在就可以from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
但是在画图过程中报错,错误代码为ImportError: warpimage method requires PIL basemap
下载了pil32位exe,发现不能兼容64位python27
于是检索stackoverflow,发现unofficial有pillow for python的库,可以替代pil
用basemap官网的例子,参考http://blog.csdn.net/ouening/article/details/55227364跑了张浙江地图: