首页 > 解决方案 > 无法安装 geopandas

问题描述

我已经尝试了 geopandas文档中的所有安装方法,但没有任何效果。

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.

我也遵循了这个答案,它为所有安装的软件包提供了类似的错误:

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

我还按照本教程下载了 5 个依赖项的二进制轮并 pip 安装它们。我有这个安装错误Fiona,,,geopandaspyproj

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.

我在我的 venv 中使用 Windows 10 中的 Python 3.8.7。我安装并设置了 GDAL,并将GDAL_DATAGDAL_DRIVER_PATH作为环境变量。

标签: pythonpipcondageopandas

解决方案


@duckboycool 和 @Ken YN 是对的,降级到 Python 3.7 就成功了!使用 conda 降级,conda install python=3.7然后conda install geopandas


推荐阅读