修改python包pip下載國內源


第一種方式-

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

附國內常用鏡像源:
阿里雲:https://mirrors.aliyun.com/pypi/simple/
中國科技大學:https://pypi.mirrors.ustc.edu.cn/simple/
清華大學:https://pypi.tuna.tsinghua.edu.cn/simple/

豆瓣(douban) http://pypi.douban.com/simple/
原始 https://pypi.python.org/simple

第二種方式-

在Linux系統中,修改~/.pip/pip.conf文件;在Windows系統中,修改C:\Users\XXX\pip\pip.ini文件。如果沒有上述文件,需要手動建立。
在文件中輸入以下內容:

[global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host = mirrors.ustc.edu.cn
 

 


免責聲明!

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



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