programing tip

ReadTimeoutError : HTTPSConnectionPool (host = 'pypi.python.org', port = 443)을 pip로 해결하는 방법은 무엇입니까?

itbloger 2020. 12. 24. 23:25
반응형

ReadTimeoutError : HTTPSConnectionPool (host = 'pypi.python.org', port = 443)을 pip로 해결하는 방법은 무엇입니까?


최근에 일부 패키지를 설치해야합니다.

pip install future
pip install scikit-learn
pip install numpy
pip install scipy

나는 또한 sudo그들 앞에 서면으로 시도 했지만 모두 빨간색 선으로 다음 오류가 발생했습니다.

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 290, 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 1198, in prepare_files
    do_download,
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1376, 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 256, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 201, in read
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

Storing debug log for failure in /root/.pip/pip.log'

예이! 답을 찾았습니다. 설치시 --default-timeout = 100 매개 변수를 사용하십시오. 예 :

sudo pip install --default-timeout=100 future

참조 URL : https://stackoverflow.com/questions/43298872/how-to-solve-readtimeouterror-httpsconnectionpoolhost-pypi-python-org-port

반응형