Python pip 切換為國內鏡像源


參考文章:https://codeplayer.vip/p/j7tmc

[windows]

備份記錄指令:(永久全局設置pypi國內鏡像源地址)

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

 [linux]

在/root/下,mkdir .pip

在/root/.pip/目錄下,touch pip.conf

編輯pip.conf

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

保存,退出,設置完畢。


免責聲明!

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



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