概述
Python 安装 pillow
pip install pillow
报错如下:
Collecting pillow
Downloading Pillow-5.3.0 (1.8MB)
Exception:
Traceback (most recent call last):
File "C:python-workspacevenvlibsite-packagespip_vendorrequestspackagesurllib3response.py", line 232, in _error_catcher
yield
File "C:python-workspacevenvlibsite-packagespip_vendorrequestspackagesurllib3response.py", line 314, in read
data = self._fp.read(amt)
File "C:python-workspacevenvlibsite-packagespip_vendorcachecontrolfilewrapper.py", line 60, in read
data = self.__fp.read(amt)
File "C:pythonpython37Libhttpclient.py", line 447, in read
n = self.readinto(b)
File "C:pythonpython37Libhttpclient.py", line 491, in readinto
n = self.fp.readinto(b)
File "C:pythonpython37Libsocket.py", line 589, in readinto
return self._sock.recv_into(b)
File "C:pythonpython37Libssl.py", line 1049, in recv_into
return self.read(nbytes, buffer)
File "C:pythonpython37Libssl.py", line 908, in read
return 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 "C:python-workspacevenvlibsite-packagespipbasecommand.py", line 215, in main
status = self.run(options, args)
File "C:python-workspacevenvlibsite-packagespipcommandsinstall.py", line 335, in run
wb.build(autobuilding=True)
File "C:python-workspacevenvlibsite-packagespipwheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:python-workspacevenvlibsite-packagespipreqreq_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:python-workspacevenvlibsite-packagespipreqreq_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "C:python-workspacevenvlibsite-packagespipdownload.py", line 821, in unpack_url
hashes=hashes
File "C:python-workspacevenvlibsite-packagespipdownload.py", line 659, in unpack_http_url
hashes)
File "C:python-workspacevenvlibsite-packagespipdownload.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "C:python-workspacevenvlibsite-packagespipdownload.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "C:python-workspacevenvlibsite-packagespiputilshashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "C:python-workspacevenvlibsite-packagespipdownload.py", line 571, in written_chunks
for chunk in chunks:
File "C:python-workspacevenvlibsite-packagespiputilsui.py", line 139, in iter
for x in it:
File "C:python-workspacevenvlibsite-packagespipdownload.py", line 560, in resp_read
decode_content=False):
File "C:python-workspacevenvlibsite-packagespip_vendorrequestspackagesurllib3response.py", line 357, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "C:python-workspacevenvlibsite-packagespip_vendorrequestspackagesurllib3response.py", line 324, in read
flush_decoder = True
File "C:pythonpython37Libcontextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "C:python-workspacevenvlibsite-packagespip_vendorrequestspackagesurllib3response.py", line 237, 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.
进入python安装目录下的Scripts内,打开控制台输入命令
C:UserssunziAppDataLocalProgramsPythonPython36Scripts>pip3 --default-timeout=100 install -U
然后提示:
You must give at least one requirement to install (see “pip help install”)
之后就可以继续安装了
最后
以上就是勤奋金毛为你收集整理的Python 安装第三方库,超时报错--Read timed out.的全部内容,希望文章能够帮你解决Python 安装第三方库,超时报错--Read timed out.所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复