我通常在编写 Python 时使用 Jupyter Notebook 接口,但最近我通过 pip (Bioservices)安装了生物服务,当我尝试打开 Jupyter Notebook 时,出现以下运行时错误:
~$ jupyter 笔记本
回溯(最近一次通话最后):
File "/usr/local/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/usr/local/lib/python2.7/dist-packages/notebook/notebookapp.py", line 60, in <module>
from .services.contents.manager import ContentsManager
File "/usr/local/lib/python2.7/dist-packages/notebook/services/contents/manager.py", line 16, in <module>
from nbformat import sign, validate, ValidationError
File "/usr/local/lib/python2.7/dist-packages/nbformat/__init__.py", line 33, in <module>
from .validator import validate, ValidationError
File "/usr/local/lib/python2.7/dist-packages/nbformat/validator.py", line 12, in <module>
from jsonschema import ValidationError
File "/usr/local/lib/python2.7/dist-packages/jsonschema/__init__.py", line 18, in <module>
from jsonschema.validators import (
File "/usr/local/lib/python2.7/dist-packages/jsonschema/validators.py", line 8, in <module>
import requests
File "/home/bioinfo/.local/lib/python2.7/site-packages/requests/__init__.py", line 74, in <module>
raise RuntimeError('Requests dependency \'chardet\' must be version >= 3.0.2, < 3.1.0!')
RuntimeError: Requests dependency 'chardet' must be version >= 3.0.2, < 3.1.0!
PS:我卸载了bioservices并没有解决错误!试图重新安装 chardet 但它给出了下一个输出:
~$ pip install chardet==3.0.2
收集chardet==3.0.2
使用缓存的 chardet-3.0.2-py2.py3-none-any.whl
安装收集的包:chardet
成功安装chardet-2.3.0