python3 切换下载源

Posted 摩羯男

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python3 切换下载源相关的知识,希望对你有一定的参考价值。

pip默认的是源是国外的,网络不好的话,等死个人,还经常中断。所以最好切换成国内的源

 

1  更改默认的下载源

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

我用的是阿里云的。速度各方面都不错

 

2 临时变更下载源

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

 

3 国内常用的源

阿里:https://mirrors.aliyun.com/pypi/simple
豆瓣:http://pypi.douban.com/simple/
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
中国科学技术大学: https://pypi.mirrors.ustc.edu.cn/simple
华中理工大学: http://pypi.hustunique.com/simple
山东理工大学: http://pypi.sdutlinux.org/simple

  

以上是关于python3 切换下载源的主要内容,如果未能解决你的问题,请参考以下文章