9

First of all i tried command from their main page, that they gave me:

pip3 install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html

Could not find a version that satisfies the requirement torch==1.3.1+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.3.1.+cpu

After this i decided to take available from this list: https://download.pytorch.org/whl/cpu/stable

So at the end i tried something like this

pip3 install torch-1.1.0-cp37-cp37m-win_amd64.whl -f https://download.pytorch.org/whl/torch_stable.html

And now they write that this is not supported wheel on my platform. Wtf? ( I use windows 7, python64, have amd) ( location of python: C:\Python38, location of pip C:\Python38\Scripts )

Andrew
  • 145
  • 1
  • 1
  • 6
  • You can get help from this https://stackoverflow.com/questions/51469194/installing-pytorch – Sheri Nov 17 '19 at 15:55

5 Answers5

11

There is no any wheels for Python 3.8 at https://download.pytorch.org/whl/torch_stable.html.

not supported wheel on my platform

This is because the wheel is for Python 3.7.

Advice: downgrade to Python 3.7.

phd
  • 82,685
  • 13
  • 120
  • 165
  • Hm I found torch-1.4.0+cpu-cp38-cp38-win_amd64.whl but when trying to install I get: **is not a supported wheel on this platform** – sqp_125 Mar 02 '20 at 18:24
  • @sqp_125 Perhaps you have 32-bit Python. Install 64-bit. – phd Mar 02 '20 at 19:47
  • Update -- now the highest supported is 3.10, but not 3.11 (as of Feb 2023) – Luke Feb 12 '23 at 01:41
1

Adding to @phd's answer, you could consider installing from source. Note that I have built PyTorch from the source in the past (and it was a mostly straightforward process) but I have not done this on windows or for Python 3.8.

Shagun Sodhani
  • 3,535
  • 4
  • 30
  • 41
0

windows

-check your system is 32 or 64 bit

-check your python is 32 or 64 bit

match your system and python version

check if pip is installed by

pip --version

install CUDA 10.2(i didn't check for CUDA 11(latest at the time of writing))

got to pytorch and select your the option and copy past the command in cmd

Sumer Singh
  • 468
  • 4
  • 9
0
pip install numpy
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html
Dharman
  • 30,962
  • 25
  • 85
  • 135
0

Also see this issue that currently affects Windows installations (even if you downgrade to Python 3.7): https://github.com/pytorch/pytorch/issues/54172

TL;DR run this command instead:

pip install torch==1.8.0+cu101 torchvision==0.9.0+cu101 torchaudio===0.8.0 -f https://download.pytorch.org/whl/torch_stable.html

Note the change from cu102 to cu101 in the command generated by https://pytorch.org/get-started/locally/

GuyPaddock
  • 2,233
  • 2
  • 23
  • 27