使用全局配置,建议使用豆瓣

如阿里

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
pip config set install.trusted-host mirrors.aliyun.com

如豆瓣

pip config set global.index-url http://pypi.douban.com/simple/
pip config set install.trusted-host pypi.douban.com

一、清华源 https://pypi.tuna.tsinghua.edu.cn/simple/

pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple/

二、阿里源 https://mirrors.aliyun.com/pypi/simple

pip install xxx -i https://mirrors.aliyun.com/pypi/simple

三、中科大源 https://pypi.mirrors.ustc.edu.cn/simple/

pip install xxx -i https://pypi.mirrors.ustc.edu.cn/simple/

四、豆瓣源 http://pypi.douban.com/simple/

pip install xxx -i http://pypi.douban.com/simple/

前提条件:

你的pip需要设置为环境变量里

如,按下 win+r,出入cmd,继续输入pip,能够正常弹出如下图

python pip安装库下载源更换(清华源、阿里源、中科大源、豆瓣源)

python pip安装库下载源更换(清华源、阿里源、中科大源、豆瓣源)

总结 

觉得上面的内容有用吗?快来点个赞吧!

点赞() 我要打赏

温馨提示 : 本站内容来自会员投稿以及互联网,所有源码及教程均为作者总结编辑,请大家在使用过程中提前做好备份,以免发生无法预知的错误,源码类教程请勿直接用于生产环境!

 可能感兴趣的文章

1 2 3 4 5