!pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
Based on this doc the command looks right. However, you didn’t explain any issue or what exactly is failing. In case pip cannot find the right wheel, make sure you are using a supported Python version.
When attempting to install specific versions of PyTorch, torchvision, and torchaudio using pip with the following command:
pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
The following errors were encountered:
ERROR: Could not find a version that satisfies the requirement torch==1.8.1+cu111 (from versions: 1.13.0, 1.13.0+cpu, 1.13.0+cu116, 1.13.0+cu117, 1.13.0+cu117.with.pypi.cudnn, 1.13.1, 1.13.1+cpu, 1.13.1+cu116, 1.13.1+cu117, 1.13.1+cu117.with.pypi.cudnn, 2.0.0, 2.0.0+cpu, 2.0.0+cpu.cxx11.abi, 2.0.0+cu117, 2.0.0+cu117.with.pypi.cudnn, 2.0.0+cu118, 2.0.1, 2.0.1+cpu, 2.0.1+cpu.cxx11.abi, 2.0.1+cu117, 2.0.1+cu117.with.pypi.cudnn, 2.0.1+cu118, 2.0.1+rocm5.3, 2.0.1+rocm5.4.2, 2.1.0, 2.1.0+cpu, 2.1.0+cpu.cxx11.abi, 2.1.0+cu118, 2.1.0+cu121, 2.1.0+cu121.with.pypi.cudnn, 2.1.0+rocm5.5, 2.1.0+rocm5.6, 2.1.1, 2.1.1+cpu, 2.1.1+cpu.cxx11.abi, 2.1.1+cu118, 2.1.1+cu121, 2.1.1+cu121.with.pypi.cudnn, 2.1.1+rocm5.5, 2.1.1+rocm5.6, 2.1.2, 2.1.2+cpu, 2.1.2+cpu.cxx11.abi, 2.1.2+cu118, 2.1.2+cu121, 2.1.2+cu121.with.pypi.cudnn, 2.1.2+rocm5.5, 2.1.2+rocm5.6, 2.2.0, 2.2.0+cpu, 2.2.0+cpu.cxx11.abi, 2.2.0+cu118, 2.2.0+cu121, 2.2.0+rocm5.6, 2.2.0+rocm5.7, 2.2.1, 2.2.1+cpu, 2.2.1+cpu.cxx11.abi, 2.2.1+cu118, 2.2.1+cu121, 2.2.1+rocm5.6, 2.2.1+rocm5.7)
ERROR: No matching distribution found for torch==1.8.1+cu111
Thsi indicates that the specific version of PyTorch (torch==1.8.1+cu111) we’re trying to install with CUDA 11.1 support is not available in the repository
.
The issue appears to be related to the version of Python being used. I encountered this problem while using Python 3.10. After downgrading to Python 3.8, the problem was resolved.
I hope this solution works for you as well!
my environment is 3.8,but still have this problem ![]()
i don’t know how to fix it
ERROR: Could not find a version that satisfies the requirement torch==1.8.1+cu111 (from versions: none)
ERROR: No matching distribution found for torch==1.8.1+cu111
seems like the URL has a problem but it’s the official order,how can i do,plz!
There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘download.pytorch.org’, port=443): Max retries exceeded with url: /whl/torch_stable.html (Cause
d by SSLError(SSLZeroReturnError(6, ‘TLS/SSL connection has been closed (EOF) (_ssl.c:1135)’))) - skipping
The reason for my error was that I installed Python 3.7.9 as a 32-bit version, which resulted in not being able to find the corresponding Torch. Switching to the 64-bit version fixed the issue. I just want to mention that the installation package for Python 3.7.9 is really frustrating. The 32-bit version is not clearly marked and is placed in front, which is very easy to mistake.
