Linux下修改pip鏡像源


在用戶文件夾下新建.pip文件夾及pip.conf文件,寫入

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

有多個pip的需要修改對應pip名稱

寫入文件后可輸入以下指令查看是否寫入成功

more ~/.pip3/pip3.conf

 成功后下載包會提示

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple

國內鏡像匯總:

http://pypi.douban.com/ 豆瓣 http://pypi.hustunique.com/ 華中理工大學 http://pypi.sdutlinux.org/ 山東理工大學 http://pypi.mirrors.ustc.edu.cn/ 中國科學技術大學 http://mirrors.aliyun.com/pypi/simple/ 阿里雲 https://pypi.tuna.tsinghua.edu.cn/simple/         清華大學

windows下同理


免責聲明!

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



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