日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python pip安装第三方库超时问题(raise ReadTimeoutError(self._pool, None, “Read timed out.“)

發布時間:2024/4/19 python 91 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python pip安装第三方库超时问题(raise ReadTimeoutError(self._pool, None, “Read timed out.“) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

不得不吐槽,有時候家里的網速,簡直感人。。分分鐘就掉眼淚,在命令行終端想下載jupyter

pip install jupyter

一直timeout!

raise ReadTimeoutError(self._pool, None, “Read timed out.”)
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

嘗試了N次之后,不得不尋求其他途徑,自然而然就想到了像一些安裝軟件常用的使用國內鏡像一樣,于是讓我找到了,安裝源,網速好的童鞋就直接pip install jupyter就好啦(羨慕別人家的孩紙┭┮﹏┭┮)

以下介紹了三種解決方案,自行選擇,我用了第二種方案解決了

首先你先要有pip工具,至于怎么安裝自行百度哦

pip下載超時處理
aise ReadTimeoutError(self._pool, None, ‘Read timed out.’)

方案一:對于比較小的庫,可以延時處理
-------- pip --default-timeout=100 install -U pip
-------- pip --default-timeout=100 install 第三方庫名

方案二:更換安裝源
------------網上可以查找很多豆瓣源
如https://pypi.tuna.tsinghua.edu.cn/simple/
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyecharts
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 庫名

比如,安裝jupyter

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

發現下載速度真的是快了好多!太贊了!


終于可以打開 jupyter notebook了,開心~下載這個折磨了我整整一下午的時間還不止啊

出錯使用這種 :pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ lightgbm

附上常用的鏡像地址

清華: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/

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

方案三:下載離線包
python所有庫:(https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml)
---------然后通過pip install 保存路徑/加上下載的文件名 進行安裝
(如pip install C:\Users\HP\Desktop\scikit_image-0.14.1-cp37-cp37m-win32.whl)

總結

以上是生活随笔為你收集整理的python pip安装第三方库超时问题(raise ReadTimeoutError(self._pool, None, “Read timed out.“)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。