您是否曾经设法使其正常工作?
我可以按照以下说明在Sierra上很好地安装basemap(也使用Homebrew作为其依赖项):http
:
//matplotlib.org/basemap/users/installing.html
有几点注意事项,只是为了确保没有什么被忽略:
- 在您的注释中,您列出了
brew install gets
,尽管我认为这是拼写错误,并且您实际上是brew install geos
在安装时使用的。 - 您确定修改.bash_profile时是否使用了正确的geos版本?我在网络上看到的一些示例使用的是特定版本,因此总是有机会出现复制/粘贴错误。截至昨天,我使用的版本是3.5.0,因此我的路径如下所示:
export GEOS_DIR=/usr/local/Cellar/geos/3.5.0/
。可以通过在/ usr / local / Cellar / geos /目录中查看安装了哪个版本来验证该版本。 - 我不是100%确信这很重要,但是您在修改.bash_profile后是否重新加载了它?
source ~/.bash_profile
。
这是我所做工作的完整列表:
brew install matplotlibbrew install numpybrew install geosbrew install proj
下载底图1.0.7源tar文件(https://sourceforge.net/projects/matplotlib/files/matplotlib-
toolkits/),将其解压缩。
添加
exportGEOS_DIR=/usr/local/Cellar/geos/3.5.0/到我的.bash_profile中的新行,然后通过以下方式重新加载它:
source ~/.bash_profile
从未标记的底图目录中:
python setup.py install
使用python脚本(通过其他教程)将basemap导入了底图
import mpl_toolkits.basemap asbm,并且能够确认它是否与生成的地图一起使用。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)