美文网首页
pip/pip3更换国内镜像源

pip/pip3更换国内镜像源

作者: LeslieLiang | 来源:发表于2018-10-30 18:45 被阅读0次

Windows下更换镜像源

  • 打开用户目录%Users/${username}/%, 如(C:/Users/用户名/), 在此目录下创建pip文件夹
  • pip目录下创建pip.ini文件, 内容如下

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

上面使用的清华的镜像源

Linux下更换镜像源

  • 修改~/.pip/pip.conf文件, 没有则创建

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

国内的其他镜像源

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

相关文章

网友评论

      本文标题:pip/pip3更换国内镜像源

      本文链接:https://www.haomeiwen.com/subject/txcntqtx.html