更改PIP源地址


臨時更改

可以在使用pip的時候,加上參數-i和鏡像地址(如
https://pypi.tuna.tsinghua.edu.cn/simple),
例如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas,這樣就會從清華鏡像安裝pandas庫。

永久更改

(1)、打開文件夾C:\Users\用戶名\AppData\Roaming
(2)、新建文件夾pip,在里面放pip.ini
(3)、在pip.ini中復制以下內容
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = https://pypi.tuna.tsinghua.edu.cn/simple

國內pip源

1、中國科學技術大學 : https://pypi.mirrors.ustc.edu.cn/simple
2、清華:https://pypi.tuna.tsinghua.edu.cn/simple
3、豆瓣:http://pypi.douban.com/simple/
4、華中理工大學 : http://pypi.hustunique.com/simple
5、山東理工大學 : http://pypi.sdutlinux.org/simple


免責聲明!

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



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