Online PyTorch Installer Failure

chaosdoc: <blockquote>
<p>I am new to PyTorch and wanted to install it on my Windows 10 64-bit workstation.  I proceeded to use the online tool to generate the following command in my case:</p>
</blockquote>
<p>pip3 install torch torchvision torchaudio --extra-index-url <a href="https://download.pytorch.org/whl/cu117" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu117</a></p>
<blockquote>
<p>After issuing this command, I obtained the following cryptic failure response:</p>
</blockquote>
<p>Looking in indexes: …, <a href="https://download.pytorch.org/whl/cu117" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu117</a><br>
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)<br>
ERROR: No matching distribution found for torch</p>
<blockquote>
<p>However, looking manually in the torch link list, I found the following distribution file that seems to fit the bill in my case:</p>
</blockquote>
<p>torch-1.13.1+cu117-cp39-cp39-win_amd64.whl</p>
<blockquote>
<p>Can anyone explain why this happened in my case?  Along these lines, I have a question to ask: When issuing the pip3 install command above, is my workstation checked out with respect to components (CUDA, Python) and their versions (12.0.0 and 3.11.1) before the install takes place?  And if so, when will PyTorch become compatible with my versions since I do want the latest for these general components?</p>
</blockquote>
<blockquote>
<p>Any assistance here for this beginner would be much appreciated…</p>
</blockquote>
<p>chaosdoc</p>

ptrblck: <aside class="quote no-group" data-username="chaosdoc" data-post="1" data-topic="168515">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/c/35a633/48.png" class="avatar"> chaosdoc:</div>
<blockquote>
<p>Can anyone explain why this happened in my case?</p>
</blockquote>
</aside>
<p>You are pointing to a Python3.9 build in <code>torch-1.13.1+cu117-cp39-cp39-win_amd64.whl</code> while you are using Python3.11, which is not supported for Windows.<br>
At least I cannot find any <code>1.13.1+cu117</code> build with <code>cp311</code> for Windows in the linked URL.</p>
<aside class="quote no-group" data-username="chaosdoc" data-post="1" data-topic="168515">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/c/35a633/48.png" class="avatar"> chaosdoc:</div>
<blockquote>
<p>When issuing the pip3 install command above, is my workstation checked out with respect to components (CUDA, Python) and their versions (12.0.0 and 3.11.1) before the install takes place?</p>
</blockquote>
</aside>
<p>No and yes. PyTorch will not use your locally installed CUDA toolkit unless you are building from source or a custom CUDA extension. You will only need a properly installed and working NVIDIA driver to install and execute the PyTorch binaries. Thus the <code>pip install</code> command doesn’t care which CUDA toolkit you are using and will install its own runtime dependencies.<br>
However, the used Python version is important and <code>pip</code> will fail as seen in your case.</p>

chaosdoc: <p>Thanks for the needed clarifying information (especially about what “cp39” means in the distribution file name)!  I will switch to Python 3.9 that was part of my previous MS Visual Studio installation and try again (will need to change the Path environment variable first).  I will let you know if I am still in trouble…</p>

hari_prasad: <p>Hi,</p>
<p>I am facing a similar issue while trying to PIP install torch 1.13.1 with cuda 11.7 with python 3.10 in the windows platform<br>
"ERROR: No matching distribution found for torch==1.13.1+cu117 "<br>
However, I see <a href="https://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp310-cp310-win_amd64.whl" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp310-cp310-win_amd64.whl</a></p>
<p>Not sure what I’m missing here, could you please help?</p>

ptrblck: <p>Could you try to download these wheels directly and install them locally via <code>pip install ./torch-1.13.1....</code>?<br>
If this works it seems your <code>pip</code> environment has trouble finding packages and you might need to update <code>pip</code> itself. If this fails it could mean that your current environment is using e.g. another Python version.</p>

chaosdoc: <p>Dear Patrick &amp; Hari:<br>
Just wanted to pop in here to let you know that I have successfully been able to install PyTorch on my Windows platform.  The crux of the matter was the version of Python.  I was trying to use the latest version (3.11.1) and this will not work; it might be the same for version 3.10 (?).  What does work is version 3.9.7.  I did have to do a direct download and manual install of the .whl files, but this was because of an unstable Internet connection that failed for the large .whl file containing torch (~2.2 GB).  Hope this helps…<br>
chaosdoc</p>

mono: <p>How and where can i download manually? i have the same error: this is what i’m trying to install:<br>
pip3 install torch torchvision torchaudio --index-url <a href="https://download.pytorch.org/whl/cu124" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu124</a></p>

ptrblck: <p>You can follow the URL you’ve posted, then click on <code>torch</code> to find all wheel locations.</p>

mono: <p>Ah found it thankyou, didn’t realize it. I went and downloaded the correct cuda and cp version and then manually installed just as shown above. I think the problem was that maybe my company’s proxy server didn’t allow for the download of such a huge file. But everything is working now. I am using python 3.11.0 now</p>