简体   繁体   中英

cannot create docker for unsupportive version of GDAL==2.4.1

I am trying to make docker from a python script. I made the requirements.txt using this -

pip3 freeze > requirements.txt

The Dockerfile is as below:

FROM python
COPY . /
RUN pip3 install -r requirements.txt
CMD [ "python", "./model/deploy/main.py" ]

It fails at this point -

Collecting GDAL==2.4.1 (from -r requirements.txt (line 42))
  ERROR: Could not find a version that satisfies the requirement GDAL==2.4.1 (from -r requirements.txt (line 42)

When I manually try to install using -

pip3 install GDAL==2.4.1 

I get this -

Requirement already satisfied: GDAL==2.4.1 in /usr/local/lib/python3.7/site-packages (2.4.1)

How can I fix the issue? I need to create the docker.

There is no GDAL version 2.4.1 at PyPI . If you have it installed that probably means the version existed at some point in the past but later was removed by the maintainers.

Try 2.4.2 or 3.0.1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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