如何在 python(x,y) 中安装底图

how to install basemap in python(x,y)

我刚开始使用 python(x,y),在尝试使用底图模块绘制一些地图时,似乎尚未安装此模块,并且还需要 GEOS 库(?? ).

我尝试使用 pip 和 python(x,y) 的 easy_install 安装底图,但它们都导致了此错误消息:

Downloading https://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz Processing basemap-1.0.7.tar.gz Writing c:\users\bunda\appdata\local\temp\easy_install-3bggpy\basemap-1.0.7\setup.cfg Running basemap-1.0.7\setup.py -q bdist_egg --dist-dir c:\users\bunda\appdata\local\temp\easy_install-3bggpy\basemap-1.0.7\egg-dist-tmp-gjqhra checking for GEOS lib in C:\Users\bunda .... checking for GEOS lib in /usr .... checking for GEOS lib in /usr/local .... checking for GEOS lib in /sw .... checking for GEOS lib in /opt .... checking for GEOS lib in /opt/local .... error: Setup script exited with Can't find geos library . Please set the environment variable GEOS_DIR to point to the location where geos is installed (for example, if geos_c.h is in /usr/local/include, and libgeos_c is in /usr/local/lib, set GEOS_DIR to /usr/local), or edit the setup.py script manually and set the variable GEOS_dir (right after the line that says "set GEOS_dir manually here".

希望有解决办法..

提前致谢!!!

python(x,y) 项目在托管在 google 代码上时曾经有一个插件页面。我不知道当项目移动到 github.

时它发生了什么

幸运的是,肯特大学有一个 mirror. There is a binary installer called basemap-1.0.2_py27.exe 可以在 python(x,y) 安装中安装底图。

希望对您有所帮助。