问题描述
在import torchvision
时提示ModuleNotFoundError:No module named 'torchvision'
,然后运行pip install torchvision
报错如下
Collecting torch (from torchvision)
Using cached https://files.pythonhosted.org/packages/5f/e9/bac4204fe9cb1a002ec6140b47f51affda1655379fe302a1caef421f9846/torch-0.1.2.post1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Qiang\AppData\Local\Temp\pip-install-7drmhsr4\torch\setup.py", line 11, in <module>
raise RuntimeError(README)
RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566).
Please follow the instructions at http://pytorch.org/ to install with miniconda instead.
解决方法
pip install --no-deps torchvision
问题解决