Python環境 - Python安裝第三方包/模塊/庫,重置timeout + 換國內鏡像

Python安裝第三方包/模塊/庫,重置timeout + 換國內鏡像

參考了:https://www.cnblogs.com/ws17345067708/p/10626781.html

臨時換源,如:

pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple

永久換源:在任何環境變量目錄(建議在C:\Users\hostname)下創建pip文件夾,在其中創建pip.ini文件,內容如下:

[global]
timeout = 60000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
use-mirrors = true
mirrors = https://pypi.tuna.tsinghua.edu.cn

國內鏡像:

阿里雲 http://mirrors.aliyun.com/pypi/simple/

中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban) http://pypi.douban.com/simple/

清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/

中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章