Windows - not a supported wheel on this platform

vinupriyesh: <p>I was using peter123’s pytorch with Anaconda on Windows platform successfully. With the new windows support I am trying to install pytorch but I keep getting not a supported wheel.</p>
<p>I’m trying</p>
<pre><code class="lang-auto">pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-win_amd64.whl 
</code></pre>
<pre><code class="lang-auto">python --version  : Python 3.6.3
pip --version : pip 10.0.1
pip3 --version : pip 10.0.1
np.version.version : 1.14.2
</code></pre>
<ul>
<li>Windows 7 - 64 bit without any CUDA supported GPU</li>
</ul>

peterjc123: <p>Can you please run this piece of code one by one in CMD?</p>
<p>where python<br>
where pip<br>
where pip3<br>
python -c “import struct;print( 8 * struct.calcsize(‘P’))”</p>

sun_xudong: <p>I guess your python version is not correct. I mean may be you are using python 3.6 of 32bit version. So change it to 64bit version.<br>
<aside class="onebox whitelistedgeneric">
  <header class="source">
      <img src="https://www.python.org/static/favicon.ico" class="site-icon" width="16" height="16">
      <a href="https://www.python.org/downloads/windows/" target="_blank" rel="nofollow noopener">Python.org</a>
  </header>
  <article class="onebox-body">
    <img src="https://www.python.org/static/opengraph-icon-200x200.png" class="thumbnail onebox-avatar" width="60" height="60">

<h3><a href="https://www.python.org/downloads/windows/" target="_blank" rel="nofollow noopener">Python Releases for Windows</a></h3>

<p>The official home of the Python Programming Language</p>


  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
<br>
find the amd64 version and install it</p>

vinupriyesh: <p>Thanks <a class="mention" href="/u/sun_xudong">@sun_xudong</a> and <a class="mention" href="/u/peterjc123">@peterjc123</a>, I had 32 bit python.  After installing python 64 bit and adding openMP runtime libraries it worked.</p>
<p>This code returned 32 previously.  Cool way to find the python version, thank you.</p>
<pre><code class="lang-auto">python -c “import struct;print( 8 * struct.calcsize(‘P’))”
</code></pre>

Jrg: <p>I have the 64 bit python, but still face the same issue.</p>

peterjc123: <p>Don’t change the filename of the whl file.</p>

mamoona_nisar: <aside class="quote no-group" data-username="peterjc123" data-post="2" data-topic="17108">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/peterjc123/48/2790_2.png" class="avatar"> peterjc123:</div>
<blockquote>
<p>python -c “import struct;print( 8 * struct.calcsize(‘P’))”</p>
</blockquote>
</aside>
<p>![imag[quote=“vinupriyesh, post:4, topic:17108, full:true”]<br>
Thanks <a class="mention" href="/u/sun_xudong">@sun_xudong</a> and <a class="mention" href="/u/peterjc123">@peterjc123</a>, I had 32 bit python.  After installing python 64 bit and adding openMP runtime libraries it worked.</p>
<p>This code returned 32 previously.  Cool way to find the python version, thank you.</p>
<pre><code class="lang-auto">python -c “import struct;print( 8 * struct.calcsize(‘P’))”
</code></pre>
<p>[/quote]</p>
<p>e|690x241](upload://awk27sG4CIL1PYY1g2TvXg5x2sQ.png)<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/2X/4/49bd1da8db0e7f3242fe59cb945ea26ea192a78c.png" data-download-href="https://discuss.pytorch.org/uploads/default/49bd1da8db0e7f3242fe59cb945ea26ea192a78c" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/2X/4/49bd1da8db0e7f3242fe59cb945ea26ea192a78c.png" alt="image" data-base62-sha1="awk27sG4CIL1PYY1g2TvXg5x2sQ" width="690" height="241" data-dominant-color="242424"><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">985×345 8.89 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>

peterjc123: <p>You are using a unicode quote <code>‘</code> instead of a ascii quote <code>'</code> in the command.</p>

peterjc123: <aside class="quote no-group" data-username="mamoona_nisar" data-post="8" data-topic="17108">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/mamoona_nisar/48/11284_2.png" class="avatar"> mamoona_nisar:</div>
<blockquote>
<p>python -c “import struct;print( 8 * struct.calcsize(‘P’))”</p>
</blockquote>
</aside>
<p>The commnd should be <code>python -c "import struct;print( 8 * struct.calcsize('P'))"</code></p>

mamoona_nisar: <p>thankyou friend ,it is working . (Y)</p>

mamoona_nisar: <p>my version is 64, using python 3.5 , but problem is still there. How you solved it. I installed torch-vision successfully but torch is giving error.<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/2X/e/ec5487d3c15c784750cb4b7619693c33f0ebe647.png" data-download-href="https://discuss.pytorch.org/uploads/default/ec5487d3c15c784750cb4b7619693c33f0ebe647" title="e3"><img src="https://discuss.pytorch.org/uploads/default/original/2X/e/ec5487d3c15c784750cb4b7619693c33f0ebe647.png" alt="e3" data-base62-sha1="xIFMUIfWbOpQLdBm8EifzObGpiD" width="675" height="500" data-dominant-color="EDECED"><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">e3</span><span class="informations">904×669 41.1 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> .<br>
I also tried</p>
<pre><code class="lang-auto">pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-win_amd64.whl 
</code></pre>

peterjc123: <p><code>"C:\Users\join2\PycharmProjects\new3amd64\venv\Scripts\pip.exe" install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp35-cp35m-win_amd64.whl</code></p>

mamoona_nisar: <pre><code class="lang-auto">Successfully installed torch-0.4.0

</code></pre>
<p>Greattttttt, I hope that can be now imported easily .thankyou</p>

mamoona_nisar: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/2X/1/16ee5d94e732d87a4249f58adc3f7533d957700e.png" data-download-href="https://discuss.pytorch.org/uploads/default/16ee5d94e732d87a4249f58adc3f7533d957700e" title="issue"><img src="https://discuss.pytorch.org/uploads/default/optimized/2X/1/16ee5d94e732d87a4249f58adc3f7533d957700e_2_690x314.png" alt="issue" data-base62-sha1="3gRcpxuW8AuzmiKnhCyHF9u1FF4" width="690" height="314" srcset="https://discuss.pytorch.org/uploads/default/optimized/2X/1/16ee5d94e732d87a4249f58adc3f7533d957700e_2_690x314.png, https://discuss.pytorch.org/uploads/default/optimized/2X/1/16ee5d94e732d87a4249f58adc3f7533d957700e_2_1035x471.png 1.5x, https://discuss.pytorch.org/uploads/default/original/2X/1/16ee5d94e732d87a4249f58adc3f7533d957700e.png 2x" data-dominant-color="F9F9F9"><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">issue</span><span class="informations">1203×549 20.3 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>

peterjc123: <aside class="onebox githubgist">
  <header class="source">
      <a href="https://gist.github.com/peterjc123/21143c0c9426a025618260dde5b6219a" target="_blank" rel="nofollow noopener">gist.github.com</a>
  </header>
  <article class="onebox-body">
    <h4><a href="https://gist.github.com/peterjc123/21143c0c9426a025618260dde5b6219a" target="_blank" rel="nofollow noopener">https://gist.github.com/peterjc123/21143c0c9426a025618260dde5b6219a</a></h4>
<h5>check_import.py</h5>
<pre><code class="Python"># This script tries to figure out the reason of
# `ImportError` on Windows.
# Run it with `python check_import.py`.

import ctypes
import glob
import os
import sys
import subprocess
</code></pre>
This file has been truncated. <a href="https://gist.github.com/peterjc123/21143c0c9426a025618260dde5b6219a" target="_blank" rel="nofollow noopener">show original</a>

<p>
</p>

  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>


jafaronly: <p>Can you please share how you manage to install it !?</p>

peterjc123: <p>The key is to keep your environment clean and do not try to install through PyCharm because it is using PyPI on which the win packages are not hosted.</p>
<ol>
<li>Remove any python that appears in <code>PATH</code> (Not needed if you use conda).</li>
<li>Install Anaconda3 / MiniConda3 / Python &gt;= 3.5.0 / 3.6.1 / 3.7.0 (For conda ones, don’t add them into PATH).</li>
<li>Open Anaconda Prompt if you use conda.</li>
<li>Type in the commands using the wizard in <a href="https://pytorch.org/" rel="nofollow noopener">https://pytorch.org/</a> (Conda ones are preferred.)</li>
<li>If you want to use PyCharm, don’t forget to set the environment to the newly-installed one.</li>
</ol>

peterjc123: <p>BTW, you can always try the simpler method: That is to find out the env that is used in PyCharm and use the pip there to install pytorch.<br>
e.g. “C:\Users\join2\PycharmProjects\new3amd64\venv\Scripts\pip.exe” install <a href="http://download.pytorch.org/whl/cpu/torch-0.4.0-cp35-cp35m-win_amd64.whl" rel="nofollow noopener">http://download.pytorch.org/whl/cpu/torch-0.4.0-cp35-cp35m-win_amd64.whl</a></p>

flamesoff: <p>Seems like correct solution. It’s worked for me.</p>

ae259e56be3fcc2ee7b6: <p>That works for me. Thanks!</p>