问题描述
我正在尝试安装geopandas.进行以下设置:
I'm trying to install geopandas. Have the following setup:
- Windows-64
- Anaconda2(64位)
- Python 2.7
尝试了两件事:
1)
pip install geopandas
这给了我以下错误:
WindowsError:[错误126]找不到指定的模块
,并且 c:\ users \ username \ appdata \中的命令"python setup.py egg_info"失败,错误代码为1local \ temp \ pip-install-_kgeyw \ shapely \
类似问题的解决方法此处表示这是由于要转换的路径中的斜线.不确定如何测试.
The solutions to the similar problem here suggest that it's because of the slashes in the path being converted. Not sure how to test this.
2)
anaconda search -t conda geopandas
然后我搜索适合我的设置的Geopandas版本(Windows-64):
I then search for the version of geopandas suitable for my setup (Windows-64):
conda install -c maxalbert geopandas
会产生以下错误:
UnsatisfiableError: The following specifications were found to be in conflict:
- geopandas
Use "conda info <package> to see the dependencies for each package
当我运行命令 conda info geopandas
时,我会得到一份geopandas版本的列表.不确定如何从这里继续.
When I run the command conda info geopandas
I get a list of geopandas version. Not sure how to proceed from here.
推荐答案
这是一个常见问题,解决方案是手动安装所有依赖项(如Geoff Boeing在此处所述: https://geoffboeing.com/2014/09/using-geopandas-windows/)
It is a common problem and the solution is to install all dependencies manually (as Geoff Boeing describes here: https://geoffboeing.com/2014/09/using-geopandas-windows/)
首先尝试 conda install -c conda-forge geopandas
.如果不起作用,请执行以下步骤:
First try to conda install -c conda-forge geopandas
. If it doesn't work, do the following steps:
- 为您的Python版本和GDAL,Fiona,pyproj,rtree和shapely(例如,从Gohlke)下载操作系统的轮子
- 卸载所有OSGeo4W,GDAL,Fiona,pyproj,rtree和shapely软件包
-
pip install
按照以下顺序下载下载的车轮:GDAL,Fiona,pyproj,rtree和shapely(例如pip install GDAL-1.11.2-cp27-none-win_amd64.whl
) - 现在您可以
pip安装geopandas
- Download wheels for your Python version and OS for GDAL, Fiona, pyproj, rtree and shapely (e.g. from Gohlke)
- Uninstall all OSGeo4W, GDAL, Fiona, pyproj, rtree and shapely packages
pip install
the downloaded wheels in the following order: GDAL, Fiona, pyproj, rtree and shapely (for examplepip install GDAL-1.11.2-cp27-none-win_amd64.whl
)- Now you can
pip install geopandas
这篇关于安装Python geopandas失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!