关于python安装镜像

2021-01-17  本文已影响0人  不务正业的设计师

在使用python pip安装时可能存在安装失败超时的问题,在这里可以使用镜像进行安装

# 安装opencv时
pip install https://pypi.tuna.tsinghua.edu.cn/simple opencv-python

如果你需要今后的下载过程设置为默认镜像,可以这样:

pip config set pip config set global.index-url 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/

上一篇 下一篇

猜你喜欢

热点阅读