错误:命令错误,退出状态为1。安装geopandas时

时间:2020-05-14 02:49:58

标签: python python-module

我正在使用win10并尝试安装geopandas:

C:\Users\61432>pip install geopandas

Collecting geopandas
  Using cached geopandas-0.7.0-py2.py3-none-any.whl (928 kB)
Requirement already satisfied: shapely in c:\users\61432\anaconda3\lib\site-packages (from geopandas) (1.7.0)
Collecting fiona
  Using cached Fiona-1.8.13.post1.tar.gz (1.2 MB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\61432\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\61432\\AppData\\Local\\Temp\\pip-install-xgic7o3y\\fiona\\setup.py'"'"'; __file__='"'"'C:\\Users\\61432\\AppData\\Local\\Temp\\pip-install-xgic7o3y\\fiona\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\61432\AppData\Local\Temp\pip-install-xgic7o3y\fiona\pip-egg-info'
         cwd: C:\Users\61432\AppData\Local\Temp\pip-install-xgic7o3y\fiona\
    Complete output (1 lines):
    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.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

1 个答案:

答案 0 :(得分:0)

  1. 首先从 https://www.lfd.uci.edu/~gohlke/pythonlibs/ 下载软件包 (GDAL,FIONA) 放入您正在处理项目的 file_path

  2. 第二次安装包 cd file_path> pip install GDAL 即(数据)C:\Users\mourinho\project> pip install GDAL-3.2.1-cp39-cp39-win_amd64.whl 然后 pip 安装菲奥娜 即(数据)C:\Users\mourinho\project> pip install Fiona-1.8.18-cp39-cp39-win_amd64.whl

  3. pip install geopandas