DL学习 | pip无论安装什么库都read time out

bug解决
来源:https//www.v2ex.com/t/327288

执行

pip install scikit-image

报错如下: Read timed out.

Exception:
Traceback (most recent call last):
  File "/Users/a710/tensorflow/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Users/a710/tensorflow/lib/python2.7/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
  File "/Users/a710/tensorflow/lib/python2.7/site-packages/pip/download.py", line 571, in written_chunks
    for chunk in chunks:
  File "/Users/a710/tensorflow/lib/python2.7/site-packages/pip/utils/ui.py", line 139, in iter
    for x in it:
  File "/Users/a710/tensorflow/lib/python2.7/site-packages/pip/download.py", line 560, in resp_read
    decode_content=False):
  File "/Users/a710/tensorflow/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 436, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/Users/a710/tensorflow/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 401, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/a710/tensorflow/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 316, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

原因是网络问题,修改为豆瓣的源

pip install --index-url https://pypi.douban.com/simple scikit-image

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值