I'm trying to install Pytorch with Windows and I'm using the commands of the official site https://pytorch.org/get-started/locally/
pip3 install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
This is the command if I choose Windows, Cuda 10.0, and Python 3.7 But if I run this I get the error message:
ERROR: Could not find a version that satisfies the requirement torch==1.2.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.2.0
So why does this happen? My pip is version 19.2 and I am in a newly installed python 3.7 environment
Package ManagerTo install the PyTorch binaries, you will need to use one of two supported package managers: Anaconda or pip.
Currently, PyTorch on Windows only supports Python 3. x; Python 2. x is not supported. After the installation is complete, verify your Anaconda and Python versions.
You don't need to have cuda to install the cuda-enabled pytorch package but you need cuda to use it. We do not ship cuda with pytorch as it is a very big library.
I tried multiple solutions and it wasn't working on Windows 10 until I tried this:
pip install torch==1.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
If you want your GPU enabled then remove the "+CPU":
pip install torch==1.5.0 -f https://download.pytorch.org/whl/torch_stable.html
The most likely reason for Your issue is a 32-bit installation of python, while the torch libraries rely on having a 64-bit version. I had exactly the same issue.
Just start python
from command line and observe
C:\Users\marci>python Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
My installation now shows 64 bits. If Yours shows 32, then install 64-bit python. I used this link: Official python 64-bit Windows installer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With