Python報錯ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.


在安裝第三方庫的時候,Python報錯:

ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

解決方法如下:

輸入指令:

pip --default-timeout=100 install 庫名稱 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

如果上面阿里雲鏡像不行的話,可以換成下面的國內鏡像網站

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

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

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

華中科技大學:http://pypi.hustunique.com/

山東理工大學:http://pypi.sdutlinux.org/

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


免責聲明!

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



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