linux-修改pip源


1.進入家目錄的隱藏 .pip目錄下

cd ~/.pip

2.創建並修改pip.conf

[global]
timeout = 10  # 超時 
index-url = http://mirrors.aliyun.com/pypi/simple/  # 第一源
index-index-url = http://pypi.douban.com/simple/  # 第二
[install]
trusted-host =
  mirrors.aliyun.com
  pypi.douban.com

ps: 可以只指定一個源 ,只需刪除第二源 及 trusted-host對應的


免責聲明!

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



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