Created
December 14, 2018 16:06
-
-
Save vandbt/62e137881a9e2014d4ded452d3e8e8dd to your computer and use it in GitHub Desktop.
How to Install PyTorch in Windows 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install Python | |
https://www.python.org/downloads/ | |
2. update pip | |
python -m pip install --upgrade pip | |
3. install numpy first | |
according to PyTorch official guide recommand that install numpy first. | |
pip install numpy | |
4. no cuda PyTorch 0.4.1 | |
pip install https://download.pytorch.org/whl/cpu/torch-0.4.1-cp37-cp37m-win_amd64.whl | |
5. Torchvision | |
pip install https://download.pytorch.org/whl/torchvision-0.1.6-py3-none-any.whl |
I have tried several solutions but still, I cannot install PyTorch locally. I do not want to use Anaconda because it disturbs my existing structure.
I got this error when I tried this solution:
ERROR: torch-0.4.1-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
I tried different versions but with the same results, "it is not a supported wheel on this platform".
My environment:
Windows 10 64bit
Python 3.8.2
pip 20.3.1
reinstall python3.7 may be useful!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I suggest you to first degrade your python 3.8.2 to python 3.6.x. (or you can install Anaconda3 version 5.2.0 as python3.6 comes with it).
and then run this command :
pip install https://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl
(notice that it should be cp36 not cp37 since you'll be using python3.6.x)
(this worked for me).