0

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!

P.S: 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

Penny Liu
  • 15,447
  • 5
  • 79
  • 98
mgrc
  • 1
  • 1
  • 2

3 Answers3

1

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

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.

teoguso
  • 71
  • 5
  • Yes, i have pip installed and working, but when i try to install this version of pip it returns: 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 – mgrc Jun 03 '17 at 14:28
  • 1. Just a quick tip: paste your traceback as code (improves readability). 2. You might need to add the keyword `--force-reinstall` when you call pip – teoguso Jun 04 '17 at 10:15
0

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
sylvain1811
  • 74
  • 1
  • 3
  • Not uninstalling chardet at /usr/lib/python2.7/dist-packages, outside environment /usr When trying to uninstall chardet – mgrc Jun 03 '17 at 14:29
0

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

Mojtaba Kamyabi
  • 3,440
  • 3
  • 29
  • 50
Akash Desai
  • 498
  • 5
  • 11