更换python-pip源到国内镜像

2018-03-15 11:28:08 9470

pip国内的一些镜像:

  • 阿里云 https://www.landui.com/pypi/simple/ 

  • 中国科技大学 https://www.landui.com/simple/ 

  • 豆瓣(douban) https://www.landui.com/simple/ 

  • 清华大学 https://www.landui.com/simple/ 


修改源方法:

1.临时使用: 

可以在使用pip的时候在后面加上-i参数,指定pip源: 

pip install scrapy -i https://www.landui.com/simple


2.永久修改: 

linux: 

修改 ~/.pip/pip.conf (没有就创建一个), 内容如下:

[global]
index-url = https://www.landui.com/simple


windows: 

直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini,内容如下:

[global]
index-url = https://www.landui.com/simple


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: