You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3.807 error: Distribution `torch==2.6.0 @ registry+https://download.pytorch.org/whl/cpu` can't be installed because it doesn't have a source distribution or wheel for the current platform
3.807
3.807 hint: You're on Linux (`manylinux_2_36_x86_64`), but `torch` (v2.6.0) only has wheels for the following platform: `macosx_11_0_arm64`
Here is the Dockerfile with minimal example that produces this error. Without opencv-python, it works, so torch is installed.
I read #11406, but could not find anything that helps me with that.
FROM ghcr.io/astral-sh/uv:0.5.24-debian-slim
COPY <<EOF /mre/pyproject.toml
[project]
name = "project"
version = "0.1.0"
requires-python = "==3.12.0"
dependencies = [
"torch>1.13.1'",
"torchvision>=0.14.1",
"opencv-python",
]
[tool.uv.sources]
torch = [{ index = "pytorch-cpu" }]
torchvision = [{ index = "pytorch-cpu" }]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
EOF
WORKDIR /mre
RUN uv sync -U
Run with docker build -t uvdebug . --progress plain --no-cache
Platform
Ubuntu 24.04, x86_64
Version
uv 0.6.0
Python version
Python 3.12.3
The text was updated successfully, but these errors were encountered:
Summary
When following the instructions on using uv with pytorch on the astral website, I encounter an error when adding opencv.
I get the error
Here is the Dockerfile with minimal example that produces this error. Without opencv-python, it works, so torch is installed.
I read #11406, but could not find anything that helps me with that.
Run with
docker build -t uvdebug . --progress plain --no-cache
Platform
Ubuntu 24.04, x86_64
Version
uv 0.6.0
Python version
Python 3.12.3
The text was updated successfully, but these errors were encountered: