能用conda安装的用conda安装,不能的使用pip
cv2
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
PIL
pip install pillow
sklearn
pip install scikit-learn
matplotlib
conda install matplotlib
更改镜像源
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
参考:https://blog.csdn.net/qq_41627235/article/details/87692748