【问题标题】:Python3.8 GDAL Could not find gdal-configPython3.8 GDAL 找不到 gdal-config
【发布时间】:2022-07-11 18:19:10
【问题描述】:

错误

[在此处输入图片描述][1] [1]:https://i.stack.imgur.com/c3qQr.png

× Getting requirements to build wheel did not run successfully.
#8 17.82   │ exit code: 1
#8 17.82   ╰─> [2 lines of output]
#8 17.82       INFO:root:GDAL API version obtained from gdal-config: 2.4.0
#8 17.82       ERROR: GDAL >= 3.1 is required for rasterio. Please upgrade GDAL.
#8 17.82       [end of output]
#8 17.82   
#8 17.82   note: This error originates from a subprocess, and is likely not a problem with pip.
#8 17.82 error: subprocess-exited-with-error
#8 17.82 
#8 17.82 × Getting requirements to build wheel did not run successfully.
#8 17.82 │ exit code: 1
#8 17.82 ╰─> See above for output.
#8 17.82 
#8 17.82 note: This error originates from a subprocess, and is likely not a problem with pip.
#8 17.83 WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
#8 17.83 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

【问题讨论】:

    标签: python python-3.8 geopandas gdal rasterio


    【解决方案1】:

    修复 GDAL 和 Python3.8

    模块或不正确的 Python 版本问题?

    文件:dockerfile

    FROM python:3.8.13-buster #by ubuntu only
    RUN apt-get update && \
        apt-get install -y binutils libproj-dev gdal-bin ffmpeg libgdal-dev
    
    COPY requirements.txt requirements.txt
    
    RUN pip install -r requirements.txt
    

    文件:requirements.text

    scikit-learn
    geovoronoi
    matplotlib
    rasterio==1.2.0
    affine==2.3.1
    attrs==21.4.0
    certifi==2022.6.15
    click==7.1.2
    click-plugins==1.1.1
    cligj==0.7.2
    Fiona==1.8.21
    geopandas==0.11.0
    munch==2.5.0
    numpy==1.23.1
    packaging==21.3
    pandas==1.4.3
    pyparsing==3.0.9
    pyproj==3.3.1
    python-dateutil==2.8.2
    pytz==2022.1
    Shapely==1.8.2
    six==1.16.0
    snuggs==1.4.7
    

    【讨论】:

      猜你喜欢
      • 2018-07-24
      • 1970-01-01
      • 2012-08-21
      • 1970-01-01
      • 1970-01-01
      • 2022-08-19
      • 1970-01-01
      • 1970-01-01
      • 2022-10-04
      相关资源
      最近更新 更多