一万个bug——Flask安装 raise ReadTimeoutError

Flask安装 raise ReadTimeoutError(self._pool, None, “Read timed out.”)

Traceback (most recent call last):
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_vendor\urllib3\response.py”, line 4
25, in _error_catcher
yield
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_vendor\urllib3\response.py”, line 5
07, in read
data = self._fp.read(amt) if not fp_closed else b""
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_vendor\cachecontrol\filewrapper.py”
, line 62, in read
data = self.__fp.read(amt)
File “D:\development\software\python\Python35\lib\http\client.py”, line 433, in read
n = self.readinto(b)
File “D:\development\software\python\Python35\lib\http\client.py”, line 473, in readinto
n = self.fp.readinto(b)
File “D:\development\software\python\Python35\lib\socket.py”, line 575, in readinto
return self._sock.recv_into(b)
File “D:\development\software\python\Python35\lib\ssl.py”, line 924, in recv_into
return self.read(nbytes, buffer)
File “D:\development\software\python\Python35\lib\ssl.py”, line 786, in read
return self._sslobj.read(len, buffer)
File “D:\development\software\python\Python35\lib\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 “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\cli\base_command.py”, line
186, in _main
status = self.run(options, args)
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\commands\install.py”, line
331, in run
resolver.resolve(requirement_set)
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\legacy_resolve.py”, line 1
77, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\legacy_resolve.py”, line 3
33, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\legacy_resolve.py”, line 2
82, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\operations\prepare.py”, li
ne 482, in prepare_linked_requirement
hashes=hashes,
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\operations\prepare.py”, li
ne 287, in unpack_url
hashes=hashes,
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\operations\prepare.py”, li
ne 159, in unpack_http_url
link, downloader, temp_dir.path, hashes
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\operations\prepare.py”, li
ne 303, in _download_http_url
for chunk in download.chunks:
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\utils\ui.py”, line 160, in
iter
for x in it:
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_internal\network\utils.py”, line 39
, in response_chunks
decode_content=False,
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_vendor\urllib3\response.py”, line 5
64, in stream
data = self.read(amt=amt, decode_content=decode_content)
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_vendor\urllib3\response.py”, line 5
29, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File “D:\development\software\python\Python35\lib\contextlib.py”, line 77, in exit
self.gen.throw(type, value, traceback)
File “D:\development\software\python\Python35\lib\site-packages\pip-20.0.2-py3.5.egg\pip_vendor\urllib3\response.py”, line 4
30, in _error_catcher
raise ReadTimeoutError(self._pool, None, “Read timed out.”)
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

根据错误提示,ReadTimeoutError是读取超时,建议使用国内镜像安装,推荐清华和豆瓣,安装方法如下(以使用清华安装flask为例)
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple flask
豆瓣是:http://pypi.douban.com/simple/
后者很多包没有,更推荐清华,如需安装指定版本,直接使用:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple flask==1.0.0即可

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值