之前在电脑上使用pip安装OpenCV时一直出现网络error,并且下载速度慢,在几十kb左右。
pip install opencv-python
更改下载源后速度明显提升,在3M左右
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python
-i 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/