[Python] 搜集整理pip国内镜像

当我们使用pip 下载第三方库的时候,下载速度会很慢, 如果使用国内镜像 将大大挺高下载速度, 如下是我搜集汇总的所有国内镜像地址,记录一下~

pip国内的一些镜像:

  阿里云: https://mirrors.aliyun.com/pypi/simple/
  中国科技大学: https://pypi.mirrors.ustc.edu.cn/simple/
  豆瓣(douban) :http://pypi.douban.com/simple/
  清华大学: https://pypi.tuna.tsinghua.edu.cn/simple/
  中国科学技术大学: http://pypi.mirrors.ustc.edu.cn/simple/

修改源的方法:

1.临时修改

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

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

 2.永久修改

linux:

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

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

windows:

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

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

 

 

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!评论后一分钟后可见哦~~~
提交
头像

昵称

取消
昵称表情

    暂无评论内容