uv: Cannot install the CPU version of torch

I tried to install the CPU version of torch but could not.

uv pip install torch==2.1.0+cpu --find-links https://download.pytorch.org/whl/torch_stable.html
# and next command gives the same result.
uv pip install torch==2.1.0 --index-url https://download.pytorch.org/whl/cpu
  × No solution found when resolving dependencies:
  ╰─▶ Because there is no version of torch==2.1.0+cpu and you require torch==2.1.0+cpu, we can conclude that the requirements are unsatisfiable.

uv version: v0.1.2 Python 3.11.7 Ubuntu 20.4 X86_64 Architecture


By the way, the install of the GPU version of torch is successful.

uv pip install torch==2.1.0
# success

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 25 (11 by maintainers)

Most upvoted comments

This should work as of the latest release:

@charliermarsh do you have any plans to add support for the most common case? uv pip install torch==2.1.0 --index-url https://download.pytorch.org/whl/cpu

Thanks @baskervilski - that makes sense to me actually (that it works), I believe the bug here relates to our handling of local versions which we’ll need to fix.

I’m actually going on a two-day trip starting today. So I won’t be able to check it until after that. Sorry about that. If anyone is tracking this issue, I would be grateful if you could check on my behalf.

I got you fam 👌