msyz999明仕亚洲官网pip 安装qrcode 错误,不知道该怎样处理

python 新手请大家辅导下
C:UsersAdministrator>pip install qrcode

Collecting qrcode
  Retrying Retrytotal=4, connect=None, read=None, redirect=None after connec
tion broken by ReadTimeoutError"HTTPSConnectionPoolhost=pypi.python.org, po
rt=443: Read timed out. read timeout=15",: /simple/qrcode/
  Retrying Retrytotal=3, connect=None, read=None, redirect=None after connec
tion broken by ReadTimeoutError"HTTPSConnectionPoolhost=pypi.python.org, po
rt=443: Read timed out. read timeout=15",: /simple/qrcode/
  Retrying Retrytotal=2, connect=None, read=None, redirect=None after connec
tion broken by ReadTimeoutError"HTTPSConnectionPoolhost=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.readamt
  File "e:\program files x86\python35-32\lib\site-packages\pip\_vendor\cacheco
ntrol\filewrapper.py", line 49, in read
    data = self.__fp.readamt
  File "e:\program files x86\python35-32\lib\http\client.py", line 448, in rea
d
    n = self.readintob
  File "e:\program files x86\python35-32\lib\http\client.py", line 488, in rea
dinto
    n = self.fp.readintob
  File "e:\program files x86\python35-32\lib\socket.py", line 575, in readinto

    return self._sock.recv_intob
  File "e:\program files x86\python35-32\lib\ssl.py", line 929, in recv_into
    return self.readnbytes, buffer
  File "e:\program files x86\python35-32\lib\ssl.py", line 791, in read
    return self._sslobj.readlen, buffer
  File "e:\program files x86\python35-32\lib\ssl.py", line 575, in read
    v = self._sslobj.readlen, 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.runoptions, args
  File "e:\program files x86\python35-32\lib\site-packages\pip\commands\instal
l.py", line 299, in run
    requirement_set.prepare_filesfinder
  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_urlresp, 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_chunksdownloaded_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.readamt=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.throwtype, 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 ReadTimeoutErrorself._pool, None, Read timed out.
pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnecti
onPoolhost=pypi.python.org, port=443: Read timed out.

Read timed out
下载超时了,天朝的网络就如许。做次序员至心不容易。
只要修正pip源了。
临时运用:pip install pythonModuleName -i https://pypi.douban.com/simple
修正默许的软件源:
修正/etc/pip.conf 文件,即可为统统用户配置.
修正~/.pip/pip.conf为以后用户配置.
windowspip配置文件为C:Usersxxpippip.ini,没有就新建.

[global]
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com

如今常用源有:

  • 清华大学 http://pypi.tuna.tsinghua.edu…

  • 中国迷信技艺大学 https://pypi.mirrors.ustc.edu…

参考我的博客pip罕见题目

(看完/读完)这篇文章有何感想! msyz999明仕亚洲官网的分享…

发表评论

姓名 *
电子邮件 *
站点