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

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > python >内容正文

python

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

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

不得不吐槽,有時(shí)候家里的網(wǎng)速,簡(jiǎn)直感人。。分分鐘就掉眼淚,在命令行終端想下載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次之后,不得不尋求其他途徑,自然而然就想到了像一些安裝軟件常用的使用國(guó)內(nèi)鏡像一樣,于是讓我找到了,安裝源,網(wǎng)速好的童鞋就直接pip install jupyter就好啦(羨慕別人家的孩紙┭┮﹏┭┮)

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

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

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

方案一:對(duì)于比較小的庫(kù),可以延時(shí)處理
-------- pip --default-timeout=100 install -U pip
-------- pip --default-timeout=100 install 第三方庫(kù)名

方案二:更換安裝源
------------網(wǎng)上可以查找很多豆瓣源
如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 庫(kù)名

比如,安裝jupyter

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

發(fā)現(xiàn)下載速度真的是快了好多!太贊了!


終于可以打開(kāi) jupyter notebook了,開(kāi)心~下載這個(gè)折磨了我整整一下午的時(shí)間還不止啊

出錯(cuò)使用這種 :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/

中國(guó)科技大學(xué) https://pypi.mirrors.ustc.edu.cn/simple/

華中理工大學(xué):http://pypi.hustunique.com/

山東理工大學(xué):http://pypi.sdutlinux.org/

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

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

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

總結(jié)

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

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。