How to install torch==1.8.1+cu111

arunskumar2000: <p>!pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f <a href="https://download.pytorch.org/whl/torch_stable.html" rel="noopener nofollow ugc">https://download.pytorch.org/whl/torch_stable.html</a></p>

ptrblck: <p>Based on <a href="https://pytorch.org/get-started/previous-versions/#linux-and-windows-23">this doc</a> the command looks right. However, you didn’t explain any issue or what exactly is failing. In case <code>pip</code> cannot find the right wheel, make sure you are using a supported Python version.</p>

CristoJV: <p>When attempting to install specific versions of PyTorch, torchvision, and torchaudio using pip with the following command:</p>
<p><code>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</code></p>
<p>The following errors were encountered:</p>
<pre data-code-wrap="console"><code class="lang-console">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
</code></pre>
<p>Thsi indicates that the specific version of PyTorch (<code>torch==1.8.1+cu111</code>) we’re trying to install with CUDA 11.1 support is not available in the repository <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=12" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> .</p>
<p>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.</p>
<p>I hope this solution works for you as well!</p>

yiming_qin: <p>my environment is 3.8,but still have this problem <img src="https://discuss.pytorch.org/images/emoji/apple/smiling_face_with_tear.png?v=12" title=":smiling_face_with_tear:" class="emoji" alt=":smiling_face_with_tear:" loading="lazy" width="20" height="20"><br>
i don’t know how to fix it</p>
<p>ERROR: Could not find a version that satisfies the requirement torch==1.8.1+cu111 (from versions: none)<br>
ERROR: No matching distribution found for torch==1.8.1+cu111</p>
<p>seems like the URL has a problem but it’s the official order,how can i do,plz!<br>
There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘<a href="http://download.pytorch.org" rel="noopener nofollow ugc">download.pytorch.org</a>’, port=443): Max retries exceeded with url: /whl/torch_stable.html (Cause<br>
d by SSLError(SSLZeroReturnError(6, ‘TLS/SSL connection has been closed (EOF) (_ssl.c:1135)’))) - skipping</p>

nefuzzy: <p>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.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/1/4/14c1c2f48763d8f6d5c64a49b555c6c80c1e82a8.png" data-download-href="https://discuss.pytorch.org/uploads/default/14c1c2f48763d8f6d5c64a49b555c6c80c1e82a8" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/1/4/14c1c2f48763d8f6d5c64a49b555c6c80c1e82a8.png" alt="image" data-base62-sha1="2XCGg4NvH2Mko9VhRhSm9IvP26k" width="690" height="340" data-dominant-color="F2F2F2"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">742×366 38.5 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>