-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You're on Linux (manylinux_2_39_x86_64
), but torch
(v2.5.1) only has wheels for the following platform: linux_aarch64
#11418
Comments
You mean like (Unfortunately I can't help further without a complete reproduction, like a |
Note the |
Same issue. Archlinux | glibc-2.41+r6+gcf88351b685d-1 | linux-6.13.2.arch1-1 | Arch: X86_64 Minimal pyproject.toml to reproduce :
$ uv sync --verbose
|
You need this: [project]
name = "aarch64-issue"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = "==3.10.*"
dependencies = [
"torch>=2.5.1",
"pytorch-triton-rocm",
]
[[tool.uv.index]]
name = "pytorch-rocm"
url = "https://download.pytorch.org/whl/rocm6.2"
explicit = true
[tool.uv.sources]
torch = [
{ index = "pytorch-rocm", marker = "sys_platform == 'linux'" },
]
pytorch-triton-rocm = [
{ index = "pytorch-rocm", marker = "sys_platform == 'linux'" },
] You're using an explicit index, but |
(I don't think your issue is related? OP is asking about the |
This is my toml file. [project]
name = "ex"
version = "0.1.0"
description = "example Project"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"aiohttp>=3.11.11",
"fastapi>=0.115.6",
"gradio==5.6.0",
"gradio-log>=0.0.8",
"haystack-ai==2.4.0",
"lingua-language-detector==2.0.2",
"loguru>=0.7.3",
"msal>=1.31.1",
"munch>=4.0.0",
"ollama-haystack==0.0.7",
"openai>=1.59.4",
"openpyxl>=3.1.5",
"psycopg2>=2.9.10",
"pypdf>=5.1.0",
"pytest>=8.3.4",
"python-dotenv>=1.0.1",
"qdrant-haystack>=7.0.0",
"ring>=0.10.1",
"sentence-transformers>=3.3.1",
"sqlalchemy==2.0.31",
"sqlitedict>=2.1.0",
"tabulate>=0.9.0",
"tiktoken>=0.8.0",
"transformers>=4.47.1",
"unidecode>=1.3.8",
"xlsxwriter>=3.2.1",
]
[dependency-groups]
dev = [
"jupyter>=1.1.1",
"pypdf2>=3.0.1",
]
[project.optional-dependencies]
cpu = [
"torch==2.5.1",
]
gpu = [
"torch==2.5.1",
]
[tool.uv]
conflicts = [ # type:ignore
[
{ extra = "cpu" },
{ extra = "gpu" },
],
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", extra = "cpu", marker = "platform_system != 'Darwin'" },
{ index = "pytorch-gpu", extra = "gpu" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-gpu"
url = "https://download.pytorch.org/whl/cu124"
explicit = true
[tool.pytest.ini_options]
pythonpath = "." # Add the project root path to the pythonpath [to be able to import the 'src' module]
filterwarnings = ["ignore::DeprecationWarning", "ignore::FutureWarning", "ignore::PendingDeprecationWarning"] On the first install everything is fine (always). But when I add a new package and change from gpu to cpu version makes some changes on uv.lock file and then new installations create problem. So I need to remove uv.lock. (Unfortunately I don't remember the exact order of reproducing the issue or if it was because of an exact package(such as lingua..)) But both of my computers that I use for this project is has x86_64 so it shouldn't even have ~$ uname -m
x86_64 @charliermarsh My second question was: when I use uv add torch, it will install last version (for example 2.6.0+cu124) and add >=2.6.0+cu124 to toml. But if I remove the lock and some months later if I reinstall from my toml, it might install a uncompatible newer version which I don't want. So is there a way to add it to toml without specifying the version? (This question is not that important for me, just a side question) |
I'll take your word for it. Still, the "aarch64" hint is confusing in both cases. |
@ldng The hint is just a fact about what wheels are available for that version... ![]() You're on x86-64, only aarch64 wheels are available for the version in the lockfile — those are incompatible architectures. The fix is to adjust your dependencies so we do not lock a version that cannot be used on your current platform. |
I'm happy to improve the hint though, do you have a suggestion that would clarify things for you? |
@charliermarsh If you cannot reproduce, if you want I can close the issue until somebody else encounters this issue and opens it again |
I think this could plausibly be improved by #11546 which I just merged. If you encounter it again and have a reproduction, I'm always happy to re-open. |
Summary
When I try to install requirements (that has pytorch with cuda) from pyproject.toml, I got this error.

$ uv sync --extra gpu error: Distribution `torch==2.5.1 @ registry+https://download.pytorch.org/whl/cu124` can't be installed because it doesn't have a source distribution or wheel for the current platform hint: You're on Linux (`manylinux_2_39_x86_64`), but `torch` (v2.5.1) only has wheels for the following platform: `linux_aarch64`
No one on other machine has touched to this
pyproject toml / uv.lock
file. I solved the issue by removinguv.lock
.The problem is all the time I have this kind of problems with uv.lock, when I remove it it works.
But since I installed torch==2.5.1 before and
uv
added this as"torch>=2.5.1"
, after removing uv.lock it insallstorch==2.6.0+cu124
.Other than this
many_linux
andlinux
uncompatibility bug, is there a way to add a specific version to pyproject.toml with uv (without editing toml file by hand)?Platform
Linux Ubuntu 24.04
Version
uv 0.5.29
Python version
Python 3.10.12
The text was updated successfully, but these errors were encountered: