Pytorch and torchvision VS Python versions

28 Views Asked by At

I have a docker file using:

FROM python:3.8-slim
COPY requirements.txt /tmp/requirements.txt
RUN python -m pip install --user --no-cache-dir -r /tmp/requirements.txt

and in the requirements, I have

--extra-index-url https://download.pytorch.org/whl/cpu
torchvision==0.14.1+cpu

Everything works fine, but now I need to upgrade the python version to 3.11. After switching to:

FROM python:3.8-slim

when building the image, I'm getting the error:

ERROR: Ignored the following yanked versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.15.0
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement torchvision==0.14.1+cpu (from versions: 0.1.6, 0.2.0, 0.15.0+cpu, 0.15.1, 0.15.1+cpu, 0.15.2, 0.15.2+cpu, 0.16.0, 0.16.0+cpu, 0.16.1, 0.16.1+cpu, 0.16.2, 0.16.2+cpu, 0.17.0, 0.17.0+cpu, 0.17.1, 0.17.1+cpu)
ERROR: No matching distribution found for torchvision==0.14.1+cpu

How can I check which versions of torch and torchvision should I use for Python3.11?

0

There are 0 best solutions below