Reputation: 953
I am trying to install torchvision and I am using the wheel file to do it, since every time I run pip install torchvision
I get the following error:
ModuleNotFoundError: No module named 'tools.nnwrap'
I downloaded the following file:
torchvision-0.3.0-cp37-cp37m-win_amd64.whl
I got the following error when I tried to install this file:
ERROR: torchvision-0.3.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
One of the answers on stackoverflow pointed out to rename the file to win32.whl, and so I did that as well:
torchvision-0.3.0-cp37-cp37m-win32.whl
On running install on this file I get the following error:
ERROR: Could not find a version that satisfies the requirement torch>=1.1.0 (from torchvision==0.3.0) (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==0.3.0)
Upvotes: 1
Views: 9589
Reputation: 2114
There are different ways to conquer this problem.
You can either use pip
(which didn't work in your case).
pip install torchvision
Another way:
conda install torchvision -c pytorch
If you want to install a specific version (include the version info):
conda install torchvision=0.3.0 -c pytorch
Another way, is download the files directly from pypi
or something like this.
After downloading the correct distribution, you can do:
pip install torchvision.whl
Another way is to install it through source:
python setup.py install
Now in your case, to workaround the issue, use pipenv
. Check this post and the answer by @adamshamsudeen.
pipenv install torch==0.4.1
Notice: The current torchvision
version is 0.3.0
Upvotes: 1