Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues installing PyTorch 1.4 - "No matching distribution found for torch===1.4.0"

Used the install guide on pytorch.org on how to install it and the command I'm using is

pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html

But it's coming up with this error;

ERROR: Could not find a version that satisfies the requirement torch===1.4.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)

ERROR: No matching distribution found for torch===1.4.0

Is this even a me-related issue? Can other people use this command?

Pip is installed and works for other modules, Python 3.8, CUDA version 10.1, Windows 10 Home 2004

like image 363
Allie Howe Avatar asked Feb 09 '20 14:02

Allie Howe


3 Answers

Looks like this issue is related to virtual environment. Did you try recommended installation line in another/new one virtual environment? If it doesn't help the possible solution might be installing package using direct link to PyTorch and TorchVision builds for your system:

pip install https://download.pytorch.org/whl/cu101/torch-1.4.0-cp38-cp38-win_amd64.whl  pip install https://download.pytorch.org/whl/cu101/torchvision-0.5.0-cp38-cp38-win_amd64.whl 
like image 59
trsvchn Avatar answered Sep 19 '22 22:09

trsvchn


In the future, I would recommend using the installation widget on the PyTorch website.

It fixed this issue for me by extending the command with -f as follows:

pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

like image 37
William Merrill Avatar answered Sep 21 '22 22:09

William Merrill


check your python version, my version is python 3.8.2 and it can't find a torch version matched the py version. And I use a 3.7.6 now, I suppose the version below 3.8 would be fine

like image 20
Draculaaair Avatar answered Sep 22 '22 22:09

Draculaaair