pip是Python的包管理工具,可以使用pip 来从 Python Package Index或其它镜像源下载Python包。
pip命令默认会连接国外的python官方服务器下载,速度可能比较慢甚至出现失败。
可以通过如下方式修改使用国内的镜像源,提高下载效率。详细可到pip官网查看配置方法。
1. 常用的国内镜像网址
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:https://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
2. 使用-i开关
使用-i开关选项添加镜像(在此以使用清华镜像站为例https://pypi.tuna.tsinghua.edu.cn/simple/)网址:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv_python

3. pip 镜像源配置
pip

最低0.47元/天 解锁文章
3925





