程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

An error is reported when installing the baostock plug-in readtimeouterror: httpsconnectionpool (host=files.pythonhosted.org, port=443): read t

編輯:Python

1、 Specific mistakes

ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/cli/base_command.py", line 178, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/commands/install.py", line 352, in run
resolver.resolve(requirement_set)
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/resolve.py", line 131, in resolve
self._resolve_one(requirement_set, req)
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/resolve.py", line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
self.require_hashes
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/operations/prepare.py", line 347, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/download.py", line 886, in unpack_url
progress_bar=progress_bar
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/download.py", line 746, in unpack_http_url
progress_bar)
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/download.py", line 954, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/download.py", line 683, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/utils/hashes.py", line 62, in check_against_chunks
for chunk in chunks:
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/download.py", line 651, in written_chunks
for chunk in chunks:
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/utils/ui.py", line 156, in iter
for x in it:
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_internal/download.py", line 640, in resp_read
decode_content=False):
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_vendor/urllib3/response.py", line 494, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_vendor/urllib3/response.py", line 459, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip/_vendor/urllib3/response.py", line 374, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

2、 Solve mistakes

sudo pip --default-timeout=100 install django

3、 reinstall baostock plug-in unit

sudo pip install baostock

perform sudo pip install baostock Basically no problem , If it's wrong , Try installing from a different source

# Install from another source baostock plug-in unit 
sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple baostock

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved