1、具体错误
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、解决错误
sudo pip --default-timeout=100 install django
3、重新安装baostock插件
sudo pip install baostock
执行sudo pip install baostock
基本就没问题了,如果还报错的话,可以尝试换个源安装
#换个源安装baostock插件 sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple baostock