-
Notifications
You must be signed in to change notification settings - Fork 1k
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
uv sync
: Distribution markupsafe==3.0.2 @ 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
#9647
Comments
To confirm, I can reproduce this
The lock entry is [[package]]
name = "markupsafe"
version = "3.0.2"
source = { registry = "https://download.pytorch.org/whl/cpu" }
wheels = [
{ url = "https://download.pytorch.org/whl/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396" },
] |
@charliermarsh looks like the universal resolver to account for wheels on additional indexes? |
@jfaust I think the recommendation here would be to use the new https://docs.astral.sh/uv/guides/integration/pytorch/ |
@zanieb Got it, that's much nicer. I'm brand new to Should I close this, or would you still expect the original to have worked? |
We should at least have a better error message for the original. |
I'm starting to think about this problem. |
Hello, I am also having a similar problem. When following the guide on how to use error: Distribution `torch==2.5.1 @ 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 I am pretty sure this worked before so I don't really know what have changed. I have also tried to set a marker specifically for linux but still get the issue. [tool.uv.sources]
torch = [
{ index = "pytorch-cpu", marker = "platform_system == 'Linux'" },
]
torchvision = [
{ index = "pytorch-cpu", marker = "platform_system == 'Linux'" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true |
Similar to #8922, but with
uv sync
. With the following pyproject.toml:I get:
If I add
https://pypi.org/simple
to the beginning of theextra-index-url
list, the problem goes away.The text was updated successfully, but these errors were encountered: