-
Notifications
You must be signed in to change notification settings - Fork 682
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
Installing PyTorch: An index URL could not be queried #8344
Comments
You probably need |
The hint at the end looks like a red herring. I guess the PyTorch index is (for some reason) returning a 403 for packages that aren't found, which seems wrong to me, but that's a PyTorch bug:
|
That seems to work. And it is necessary because of the pytorch bug? Because in theory pip should be able to find that version itself automatically, right? |
@charliermarsh My bad, actually doesn't work.
Same error as before. |
@Leon0402 Use uv pip install torch==2.0.0+cu118 torchvision==0.15.0+cu118 torchaudio==2.0.0+cu118 --extra-index-url https://download.pytorch.org/whl/cu118 There are actually differences between uv and pip in terms of index resolution. I think the problem here. It's not a bug, but they're just not exactly the same. Edit: |
@FishAlchemist It seems to generally work quite well when manually editing the toml file. Here is a version that works for me for instance: [project]
name = "name"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"torch==2.4.0+cu118",
"torchvision==0.19.0+cu118",
]
[tool.uv.sources]
torch = { index = "pytorch" }
torchvision = { index = "pytorch" }
[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu118"
explicit = true Related to #8341 I think. Probably the CLI tools need a little bit more work and then UV could have some special documentation for torch. I know that torch always is a great source of confusion, because getting it right with cuda is not easy (and probably also not possible right now in the most generic way). |
@FishAlchemist Love it! I'll have a look later. |
Setup is:
Leading to the simple
pyproject.toml
:Trying to install torch with:
leads to the error:
Alternatively using pip:
leads to a different error:
I am on a Linux System and use uv 0.4.24.
Using virtualenv and normal pip works fine, thus I suspect a problem with uv here.
The text was updated successfully, but these errors were encountered: