看了很多篇别人的博客试着配置pip使用的镜像源,发现网上很多还在抄袭老镜像源博客的人不知道现在豆瓣源的网站已经更新了
原来的网址为:
https://pypi.douban.com/simple/
现在的网址为:
https://pypi.doubanio.com/simple/
请注意使用更新后的豆瓣源,别再坑别人了,挺幽默的
附上我使用的pip.ini文件代码:
[global]
timeout = 20
disable-pip-version-check = true
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
extra-index-url =
https://mirrors.aliyun.com/pypi/simple/
https://pypi.doubanio.com/simple/
https://pypi.mirrors.ustc.edu.cn/simple/
https://pypi.org/simple
trusted-host =
pypi.tuna.tsinghua.edu.cn
mirrors.aliyun.com
pypi.doubanio.com
pypi.mirrors.ustc.edu.cn
pypi.org
[install]
use-mirrors = true
我不喜欢更新pip,如果有希望实时更新pip最新版本的disable-pip-version-check = true 改false,index-url和extra-index-url是按顺序查找的,如有需要的可以自行更换位置
另外信任主机放在install上面是因为更新的时候也希望使用镜像源