ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch

Viewed 2351

I tried to download torch by using pip install torch

I faced this problem:

C:\Users\Ahmad Sadek>pip install torch
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
2 Answers

This occurs if you are on a version of python greater than 3.7 on Windows. PyTorch specifies on their website that versions later than 3.7 are not supported. I had this error show up for me on my Windows machine when using 3.8. After installing 3.7 and setting that as the default python the issue resolved.

It isn't officially supported by 3.10 yet. Use the nightly builds:

pip3 install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
Related