Windows - not a supported wheel on this platform

(Vinu Priyesh) #1

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.

I’m trying

pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-win_amd64.whl 
python --version  : Python 3.6.3
pip --version : pip 10.0.1
pip3 --version : pip 10.0.1
np.version.version : 1.14.2
  • Windows 7 - 64 bit without any CUDA supported GPU
(Pu Jiachen) #2

Can you please run this piece of code one by one in CMD?

where python
where pip
where pip3
python -c “import struct;print( 8 * struct.calcsize(‘P’))”

2 Likes
(Sun Xudong) #3

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.


find the amd64 version and install it

3 Likes
Can't install pytorch 0.4.0 on windows 10 using pip3
(Vinu Priyesh) #4

Thanks @sun_xudong and @peterjc123, I had 32 bit python. After installing python 64 bit and adding openMP runtime libraries it worked.

This code returned 32 previously. Cool way to find the python version, thank you.

python -c “import struct;print( 8 * struct.calcsize(‘P’))”
#5

I have the 64 bit python, but still face the same issue.

(Pu Jiachen) #7

Don’t change the filename of the whl file.

(Mamoona Nisar) #8

![imag[quote=“vinupriyesh, post:4, topic:17108, full:true”]
Thanks @sun_xudong and @peterjc123, I had 32 bit python. After installing python 64 bit and adding openMP runtime libraries it worked.

This code returned 32 previously. Cool way to find the python version, thank you.

python -c “import struct;print( 8 * struct.calcsize(‘P’))”

[/quote]

e|690x241](upload://awk27sG4CIL1PYY1g2TvXg5x2sQ.png)

(Pu Jiachen) #9

You are using a unicode quote instead of a ascii quote ' in the command.

(Pu Jiachen) #10

The commnd should be python -c "import struct;print( 8 * struct.calcsize('P'))"

1 Like
(Mamoona Nisar) #11

thankyou friend ,it is working . (Y)

(Mamoona Nisar) #12

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.

.
I also tried

pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-win_amd64.whl 
(Pu Jiachen) #13

"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

1 Like
(Mamoona Nisar) #14
Successfully installed torch-0.4.0

Greattttttt, I hope that can be now imported easily .thankyou

(Mamoona Nisar) #15

(Pu Jiachen) #16
(Jafar Jabr) #17

Can you please share how you manage to install it !?

(Pu Jiachen) #18

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.

  1. Remove any python that appears in PATH (Not needed if you use conda).
  2. Install Anaconda3 / MiniConda3 / Python >= 3.5.0 / 3.6.1 / 3.7.0 (For conda ones, don’t add them into PATH).
  3. Open Anaconda Prompt if you use conda.
  4. Type in the commands using the wizard in https://pytorch.org/ (Conda ones are preferred.)
  5. If you want to use PyCharm, don’t forget to set the environment to the newly-installed one.
(Pu Jiachen) #19

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.
e.g. “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

(flamesoff) #20

Seems like correct solution. It’s worked for me.

(何小豪) #21

That works for me. Thanks!