
安装pip
sudo apt install python-pip
后续利用pip安装完库,pip list查看库存在,但是import 时又显示库不存在,所以又安装了pip3
sudo apt install python3-pip
后续利用pip3安装opencv时出现以下错误:Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-jg8usrjf/opencv-python/
解决方法是升级pip
pip3 install --upgrade pip2.opencv安装
pip3 --default-timeout=100 install opencv-python -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com3.torch安装
pip3 --default-timeout=100 install torch==1.6.0 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com4.opencv安装
pip3 --default-timeout=100 install torchvision -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com