简体   繁体   中英

Runtime Error when trying to launch Jupyter Notebook (Python)

I usually work with the Jupyter Notebook Interface when programming Python but recently I installed bioservices through pip (Bioservices) and when I tried to open the Jupyter Notebook I get the following RunTime error:

~$ jupyter notebook

Traceback (most recent call last):

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: I uninstalled bioservices and it did not solve the error! Tried to reinstall chardet but it give the next output:

~$ pip install chardet==3.0.2

Collecting chardet==3.0.2

Using cached chardet-3.0.2-py2.py3-none-any.whl

Installing collected packages: chardet

Successfully installed chardet-2.3.0

This looks like a broken dependency. Have you tried installing the correct version of the chardet package, eg

pip install chardet==3.0.2

Of course here I'm assuming you have pip installed. Otherwise you're stuck with what your system ships. In that case, I would advise installing pip or any alternative way to control you python installation on a finer level.

Apparently you have a package named chardet required somewhere, but the version of this module is deprecated. Try to update chardet with pip upgrade chardet or uninstall and reinstall it.

$ pip uninstall chardet
$ pip install chardet

I have also same error. after trying all it doesn't work for me. so I simply uninstall it:

pip uninstall jupyter

Then again install jupyter notebook (it doesn't remove your installed library, simply uninstall jupyter) let's try

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM