I need pytorch module to run my project. But When I tried to install it via command prompt via two different ways, it shows an error -
.
C:\Users\Toothless>pip install torchvision --user
Collecting torchvision
Using cached https://files.pythonhosted.org/packages/b7/ff /091b4503d5f228bd1120db784e2c071617211b965a8a78018e75750c7199/torchvision-0.3.0-cp37-cp37m-win_amd64.whl
Requirement already satisfied: six in c:\users\toothless\appdata\local\programs\python\python37\lib\site-packages (from torchvision) (1.12.0)
Collecting pillow>=4.1.1 (from torchvision)
Downloading https://files.pythonhosted.org/packages/ae/96/6f83deebfcd20a5d4ad35e4e989814a16559d8715741457e670aae1a5a09/Pillow-6.1.0-cp37-cp37m-win_amd64.whl (2.0MB)
|████████████████████████████████| 2.0MB 27kB/s
Requirement already satisfied: numpy in c:\users\toothless\appdata\local\programs\python\python37\lib\site-packages (from torchvision) (1.17.0)
Collecting torch>=1.1.0 (from torchvision)
ERROR: Could not find a version that satisfies the requirement torch>=1.1.0 (from torchvision) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.1.0 (from torchvision)
C:\Users\Toothless>pip3 install torchvision
Collecting torchvision
Using cached https://files.pythonhosted.org/packages/b7/ff/091b4503d5f228bd1120db784e2c071617211b965a8a78018e75750c7199/torchvision-0.3.0-cp37-cp37m-win_amd64.whl
Requirement already satisfied: six in c:\users\toothless\appdata\local\programs\python\python37\lib\site-packages (from torchvision) (1.12.0)
Collecting torch>=1.1.0 (from torchvision)
ERROR: Could not find a version that satisfies the requirement torch>=1.1.0 (from torchvision) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.1.0 (from torchvision)
Again I've tried to installed through pycharm
.
I've been following this question but conda`` is not listed in my envairoment variable.
Edited: When I tried pip install torch torchvision --user this command it gives an error - ERROR: torchvision 0.3.0 has requirement torch>=1.1.0, but you'll have torch 0.1.2.post2 which is incompatible.
Edited: I've also tried pip install torchvision but it shows with error -
C:\Users\Toothless>pip install torchvision
Collecting torchvision
Using cached https://files.pythonhosted.org/packages/b7/ff/091b4503d5f228bd1120db784e2c071617211b965a8a78018e75750c7199/torchvision-0.3.0-cp37-cp37m-win_amd64.whl
Collecting torch>=1.1.0 (from torchvision)
ERROR: Could not find a version that satisfies the requirement torch>=1.1.0 (from torchvision) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.1.0 (from torchvision)
What should i do now to make a workable pytorch?
Finally I've installed my desired pytorch & torchvision. I've installed it via pip. The commandline I've used to install pytorch:
pip3 install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-win_amd64.whl
And for torchVision:
pip3 install https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp37-cp37m-win_amd64.whl
I've found this code from PyTorch website.

Check with:
pip install torchvision --no-deps
It can be because of the dependencies.
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