-1

这是问题所在

Exception:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
        status = self.run(options, args)
      File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
        requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1197, in prepare_files
        do_download,
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1375, in unpack_url
        self.session,
      File "/usr/lib/python2.7/dist-packages/pip/download.py", line 572, in unpack_http_url
        download_hash = _download_url(resp, link, temp_location)
      File "/usr/lib/python2.7/dist-packages/pip/download.py", line 433, in _download_url
        for chunk in resp_read(4096):
      File "/usr/lib/python2.7/dist-packages/pip/download.py", line 421, in resp_read
        chunk_size, decode_content=False):
      File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 225, in stream
        data = self.read(amt=amt, decode_content=decode_content)
      File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 174, in read
        data = self._fp.read(amt)
      File "/usr/lib/python2.7/httplib.py", line 567, in read
        s = self.fp.read(amt)
      File "/usr/lib/python2.7/socket.py", line 380, in read
        data = self._sock.recv(left)
      File "/usr/lib/python2.7/ssl.py", line 341, in recv
        return self.read(buflen)
      File "/usr/lib/python2.7/ssl.py", line 260, in read
        return self._sslobj.read(len)
    SSLError: The read operation timed out

Storing debug log for failure in /home/eason/.pip/pip.log
4

1 回答 1

2

了解如何阅读错误消息:

 SSLError: The read operation timed out

这意味着服务器有一段时间没有响应任何内容。服务器可能很忙或有问题。您应该稍后再尝试安装。

如果您有很多延迟,您可能希望使用更大的超时值调用 pip。

pip --default-timeout=120 install ...

等待 120 秒后将超时。默认值应为 60 秒。

在此处查看 pip 的文档:https ://pip.pypa.io/en/latest/user_guide.html

于 2015-05-21T10:40:22.287 回答