我正在尝试安装en进行spacy,但它给出以下错误

时间:2019-02-02 11:55:52

标签: python ubuntu spacy

$ python -m spacy download en
3:05:52Exception:

Traceback (most recent call last):

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 143, in mainstatus = self.run(options, args)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 318, in run
resolver.resolve(requirement_set)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 283, in prepare_linked_requirement progress_bar=self.progress_bar

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 836, in unpack_url
progress_bar=progress_bar

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 673, in unpack_http_url
progress_bar)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 897, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 619, in _download_url
consume(downloaded_chunks)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 848, in consume
deque(iterator, maxlen=0)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 585, in written_chunks
for chunk in chunks:

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/utils/ui.py", line 159, in iter
for x in it:

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 574, in resp_read
decode_content=False):

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 465, in stream
data = self.read(amt=amt, decode_content=decode_content)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 430, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)

File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)

File "/home/yesha/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 345, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')

ReadTimeoutError: HTTPSConnectionPool(host='github-production-release-asset-2e65be.s3.amazonaws.com', port=443): Read timed out.

1 个答案:

答案 0 :(得分:0)

服务器(PyPi)花费太多时间来回答客户的问题。

检查主目录中pip的配置。

您可以增加超时值:

[global]
timeout = 60

然后重试...