更換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/

修改源方法:

臨時使用:
可以在使用pip的時候在后面加上-i參數,指定pip源
eg: pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple

永久修改:
linux:
修改 ~/.pip/pip.conf (沒有就創建一個), 內容如下:

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

 建議使用清華源,更新快.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM