繁体   English   中英

Python3.8 GDAL 找不到 gdal-config

[英]Python3.8 GDAL Could not find gdal-config

错误

[在此处输入图像描述][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.

修复 GDAL & Python3.8

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

文件:码头文件

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM