I’m conda to manage a python project, now I want to deploy my app to a linux machine.
ihave this Dockerfile :
FROM python:3.9-slim
COPY . /app
WORKDIR /app
RUN pip3 install -r requirements.txt
ENTRYPOINT [ "streamlit","run","main.py","--server.port=8501", "--server.address=0.0.0.0"]
to generate requirements.txt i run pip list --format=freeze > requirements.txt
when I run docker compose build --no-cache
I got this error :
18.69 ERROR: Ignored the following versions that require a different python version: 1.3.1 Requires-Python >=3.10
18.69 ERROR: Could not find a version that satisfies the requirement contourpy==1.3.1 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.1.0, c1, 1.1.1, 1.2.0, 1.2.1rc1, 1.2.1, 1.3.0)
18.69 ERROR: No matching distribution found for contourpy==1.3.1
24.04
24.04 [notice] A new release of pip is available: 23.0.1 -> 24.3.1
24.04 [notice] To update, run: pip install --upgrade pip
and contourpy==1.3.1 is present in https://pypi.org/
any solution to this problem please ?
thnaks
6
According to pypi, contourpty
1.3.1 requires Python version 3.10 (or later):
Unless you have a specific reason to use an older version of Python, it’s a good idea to base your container images on the latest release. It looks like contourpy
versions earlier than 1.3.1 will work with Python 3.9.
3
The mkl_fft library typically supports stable Python versions. You should downgrade your python version such as
- python:3.11-slim
- python:3.12-slim
By using these version the command should work!
pip install mkl-fft
Ahmad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
9