python 安裝第三方庫啰脚,超時報錯--Read timed out.

Traceback (most recent call last):
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 228, in _error_catcher
yield
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 310, in read
data = self._fp.read(amt)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 49, in read
data = self.__fp.read(amt)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/http/client.py", line 433, in read
n = self.readinto(b)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/http/client.py", line 473, in readinto
n = self.fp.readinto(b)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/socket.py", line 571, in readinto
return self._sock.recv_into(b)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/ssl.py", line 924, in recv_into
return self.read(nbytes, buffer)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/ssl.py", line 786, in read
return self._sslobj.read(len, buffer)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/ssl.py", line 570, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/commands/install.py", line 299, in run
requirement_set.prepare_files(finder)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/req/req_set.py", line 587, in _prepare_file
session=self.session, hashes=hashes)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/download.py", line 810, in unpack_url
hashes=hashes
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/download.py", line 649, in unpack_http_url
hashes)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/download.py", line 871, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/download.py", line 595, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/download.py", line 563, in written_chunks
for chunk in chunks:
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/utils/ui.py", line 139, in iter
for x in it:
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/download.py", line 552, in resp_read
decode_content=False):
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 353, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 320, in read
flush_decoder = True
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 233, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

image

解決方法眠砾,設置超時時間

pip --default-timeout=100 install -U Pillow

image
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市俐东,隨后出現(xiàn)的幾起案子鲸阔,更是在濱河造成了極大的恐慌,老刑警劉巖灸姊,帶你破解...
    沈念sama閱讀 211,884評論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件拱燃,死亡現(xiàn)場離奇詭異,居然都是意外死亡力惯,警方通過查閱死者的電腦和手機碗誉,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,347評論 3 385
  • 文/潘曉璐 我一進店門召嘶,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人哮缺,你說我怎么就攤上這事弄跌。” “怎么了尝苇?”我有些...
    開封第一講書人閱讀 157,435評論 0 348
  • 文/不壞的土叔 我叫張陵铛只,是天一觀的道長。 經(jīng)常有香客問我糠溜,道長淳玩,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 56,509評論 1 284
  • 正文 為了忘掉前任非竿,我火速辦了婚禮蜕着,結果婚禮上,老公的妹妹穿的比我還像新娘红柱。我一直安慰自己承匣,他們只是感情好,可當我...
    茶點故事閱讀 65,611評論 6 386
  • 文/花漫 我一把揭開白布锤悄。 她就那樣靜靜地躺著韧骗,像睡著了一般驰吓。 火紅的嫁衣襯著肌膚如雪沈贝。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,837評論 1 290
  • 那天弊知,我揣著相機與錄音握牧,去河邊找鬼容诬。 笑死娩梨,一個胖子當著我的面吹牛沿腰,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播狈定,決...
    沈念sama閱讀 38,987評論 3 408
  • 文/蒼蘭香墨 我猛地睜開眼颂龙,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了纽什?” 一聲冷哼從身側響起措嵌,我...
    開封第一講書人閱讀 37,730評論 0 267
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎芦缰,沒想到半個月后企巢,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 44,194評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡让蕾,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,525評論 2 327
  • 正文 我和宋清朗相戀三年浪规,在試婚紗的時候發(fā)現(xiàn)自己被綠了或听。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 38,664評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡笋婿,死狀恐怖誉裆,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情缸濒,我是刑警寧澤足丢,帶...
    沈念sama閱讀 34,334評論 4 330
  • 正文 年R本政府宣布,位于F島的核電站庇配,受9級特大地震影響斩跌,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜捞慌,卻給世界環(huán)境...
    茶點故事閱讀 39,944評論 3 313
  • 文/蒙蒙 一滔驶、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧卿闹,春花似錦揭糕、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,764評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至旋恼,卻和暖如春吏口,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背冰更。 一陣腳步聲響...
    開封第一講書人閱讀 31,997評論 1 266
  • 我被黑心中介騙來泰國打工产徊, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人蜀细。 一個月前我還...
    沈念sama閱讀 46,389評論 2 360
  • 正文 我出身青樓舟铜,卻偏偏與公主長得像,于是被迫代替她去往敵國和親奠衔。 傳聞我的和親對象是個殘疾皇子谆刨,可洞房花燭夜當晚...
    茶點故事閱讀 43,554評論 2 349

推薦閱讀更多精彩內(nèi)容