찾다

 >  Q&A  >  본문

python - pip 安装qrcode 错误,不知道该怎么解决

python 新手请大家指点下
C:UsersAdministrator>pip install qrcode

Collecting qrcode
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connec
tion broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', po
rt=443): Read timed out. (read timeout=15)",)': /simple/qrcode/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connec
tion broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', po
rt=443): Read timed out. (read timeout=15)",)': /simple/qrcode/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connec
tion broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', po
rt=443): Read timed out. (read timeout=15)",)': /simple/qrcode/
  Downloading qrcode-5.3-py2.py3-none-any.whl
Exception:
Traceback (most recent call last):
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\_vendor\request
s\packages\urllib3\response.py", line 228, in _error_catcher
    yield
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\_vendor\request
s\packages\urllib3\response.py", line 310, in read
    data = self._fp.read(amt)
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\_vendor\cacheco
ntrol\filewrapper.py", line 49, in read
    data = self.__fp.read(amt)
  File "e:\program files (x86)\python35-32\lib\http\client.py", line 448, in rea
d
    n = self.readinto(b)
  File "e:\program files (x86)\python35-32\lib\http\client.py", line 488, in rea
dinto
    n = self.fp.readinto(b)
  File "e:\program files (x86)\python35-32\lib\socket.py", line 575, in readinto

    return self._sock.recv_into(b)
  File "e:\program files (x86)\python35-32\lib\ssl.py", line 929, in recv_into
    return self.read(nbytes, buffer)
  File "e:\program files (x86)\python35-32\lib\ssl.py", line 791, in read
    return self._sslobj.read(len, buffer)
  File "e:\program files (x86)\python35-32\lib\ssl.py", line 575, 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 "e:\program files (x86)\python35-32\lib\site-packages\pip\basecommand.py"
, line 215, in main
    status = self.run(options, args)
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\commands\instal
l.py", line 299, in run
    requirement_set.prepare_files(finder)
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\req\req_set.py"
, line 370, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\req\req_set.py"
, line 587, in _prepare_file
    session=self.session, hashes=hashes)
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\download.py", l
ine 810, in unpack_url
    hashes=hashes
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\download.py", l
ine 649, in unpack_http_url
    hashes)
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\download.py", l
ine 871, in _download_http_url
    _download_url(resp, link, content_file, hashes)
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\download.py", l
ine 595, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\utils\hashes.py
", line 46, in check_against_chunks
    for chunk in chunks:
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\download.py", l
ine 563, in written_chunks
    for chunk in chunks:
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\download.py", l
ine 552, in resp_read
    decode_content=False):
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\_vendor\request
s\packages\urllib3\response.py", line 353, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\_vendor\request
s\packages\urllib3\response.py", line 320, in read
    flush_decoder = True
  File "e:\program files (x86)\python35-32\lib\contextlib.py", line 77, in __exi
t__
    self.gen.throw(type, value, traceback)
  File "e:\program files (x86)\python35-32\lib\site-packages\pip\_vendor\request
s\packages\urllib3\response.py", line 233, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnecti
onPool(host='pypi.python.org', port=443): Read timed out.
PHP中文网PHP中文网2809일 전1053

모든 응답(1)나는 대답할 것이다

  • PHPz

    PHPz2017-04-18 09:51:22

    Read timed out
    다운로드 시간이 초과되었습니다. 중국 네트워크가 그렇습니다. 프로그래머가 되는 것은 정말 쉽지 않습니다.
    pip 소스만 수정하세요.
    임시 사용: pip install pythonModuleName -i https://pypi.douban.com/simple
    기본 소프트웨어 소스 수정:
    /etc/pip.conf 파일을 수정하여 모든 사용자에 대해 구성합니다.
    ~/.pip/pip.conf을 현재 사용자 구성으로 수정합니다.
    windows 아래의 pip 구성 파일은 C:Usersxxpippip.ini입니다. 그렇지 않은 경우 새로 만드세요.

    으아악

    현재 일반적으로 사용되는 소스는 다음과 같습니다.

    • 청화대학교 http://pypi.tuna.tsinghua.edu...

    • 중국과학기술대학교 https://pypi.mirrors.ustc.edu...

    내 블로그 pip FAQ를 참고하세요

    회신하다
    0
  • 취소회신하다