当前位置:   article > 正文

pip更换下载源_更换pip下载源

更换pip下载源

可供选择的下载源:

清华

https://pypi.tuna.tsinghua.edu.cn/simple/
  • 1

中科大

https://pypi.mirrors.ustc.edu.cn/simple/
  • 1

阿里云

https://mirrors.aliyun.com/pypi/simple/
  • 1

豆瓣

http://pypi.douban.com/simple/
  • 1

下面以清华源为例,pip下载修改为清华源:

执行下面代码:

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
  • 1

会输出:

Writing to C:\Users\duanying\AppData\Roaming\pip\pip.ini
  • 1

此时就成功了

临时修改下载源:

pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple
  • 1

其中xxx为你要下载的包,
只需要在后面加上

-i https://pypi.tuna.tsinghua.edu.cn/simple
  • 1

就行了

参考:

  • [1] https://blog.csdn.net/Carl_Shawshank/article/details/123449481?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165876334116781667813627%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=165876334116781667813627&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~pc_rank_34-1-123449481-null-null.142v34pc_rank_34,185v2control&utm_term=pip%E6%8D%A2%E6%B8%85%E5%8D%8E%E4%B8%8B%E8%BD%BD%E6%BA%90&spm=1018.2226.3001.4187
  • [2] https://blog.csdn.net/qq_39330829/article/details/109157173?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165876379516782248561715%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=165876379516782248561715&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduend~default-1-109157173-null-null.142v34pc_rank_34,185v2control&utm_term=pip%E6%8D%A2%E4%B8%8B%E8%BD%BD%E6%BA%90&spm=1018.2226.3001.4187
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/159884
推荐阅读
相关标签
  

闽ICP备14008679号