【问题标题】:Impossible to install geopandas无法安装 geopandas
【发布时间】: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 安装它们。安装Fionageopandaspyproj时出现此错误

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_DATAGDAL_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


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    你首先需要创建一个环境, 然后在新环境中尝试安装 Geopandas:

    1- conda create -n geo_env
    2- conda activate geo_env
    3- conda config --env --add channels conda-forge
    4- conda config --env --set channel_priority strict
    5- conda install python=3 geopandas
    

    以及以下视频: https://youtu.be/k-MWeAWEta8 https://geopandas.org/getting_started/install.html

    【讨论】:

      猜你喜欢
      • 2020-07-12
      • 1970-01-01
      • 2020-12-11
      • 2022-12-20
      • 1970-01-01
      • 2022-06-11
      • 2021-04-11
      • 2020-10-30
      • 2020-08-08
      相关资源
      最近更新 更多