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