【发布时间】:2021-06-19 15:51:21
【问题描述】:
geopandas 的documentation 中的所有安装方法我都试过了,没有任何效果。
conda install geopandas 给了
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your CUDA driver:
- feature:/win-32::__cuda==10.1=0
Your installed CUDA driver is: 10.1
conda install --channel conda-forge geopandas 给出同样的错误。
用 conda 创建了一个新环境:
Package python conflicts for:
python=3
geopandas -> python[version='2.7.*|3.5.*|3.6.*|>=3.5|>=3.6|3.4.*|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0']
geopandas -> pandas[version='>=0.24'] -> python[version='>=3.7|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']The following specifications were found to be incompatible with your CUDA driver:
- feature:/win-32::__cuda==10.1=0
Your installed CUDA driver is: 10.1
我尝试从源安装,没有运气:
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
我还关注了this answer,它对所有安装的软件包都给出了类似的错误:
Package `geopandas` found in cache
Downloading package . . .
https://download.lfd.uci.edu/pythonlibs/z4tqcw5k/geopandas-0.8.1-py3-none-any.whl
geopandas-0.8.1-py3-none-any.whl
Traceback (most recent call last):
File "C:\Users\\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
我还关注了this tutorial 并下载了 5 个依赖项的二进制轮并 pip 安装它们。安装Fiona、geopandas、pyproj时出现此错误
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
我在 Windows 10 中使用 Python 3.8.7。我安装了 GDAL 并将 GDAL_DATA 和 GDAL_DRIVER_PATH 设置为环境变量。
【问题讨论】:
-
文档说要使用
conda install python=3 geopandas,你试过python=3吗?同样从我所见,这个错误与你的 python 版本有关,所以也许你应该尝试一个旧版本(从 3.7 到 3.8 似乎是错误的最常见原因)。 -
根据this GitHub issue 的说法,Python 3.8+ 和依赖于 CUDA 的软件包似乎存在严重问题。使用 Python 3.7 似乎是唯一可靠的解决方法。
-
你们是对的,降级到 3.7 作品!谢谢
-
查看我对这个问题的回答:gis.stackexchange.com/questions/179706/…
标签: python pip conda geopandas