1、问题:
在anaconda安装了pytorch后,用delect.py打开本机摄像头时出现报错:
ModuleNotFoundError: No module named 'torchvision'
且pycharm提示安装包不符合要求。
(不符合要求的安装包分别是opencv-python、torch、torchvision、thop)
且按照提示安装相关包时出现以下报错:
To search for alternate channels that may provide the conda package you’re looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
2、解决方法1:
更新torchvision的版本至0.4.1
pip install cffi -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install cmake -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install mkl -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install pyyaml -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip insta