ImportError on the jupyter notebook despite installing the library called

0

I tried to import a library, but it does not seem to be added to the jupyter notebook

import sys

print("sys.executable:\n",sys.executable)
print("sys.path:\n",sys.path)

from textblob import TextBlob

And that gives me

    sys.executable:
     /usr/bin/python3
    sys.path:
     ['', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', 
'/usr/lib/python3.5/lib-dynload', '/home/mike/.local/lib/python3.5/site-packages',
'/usr/local/lib/python3.5/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/local/lib/python3.5/dist-packages/IPython/extensions',
'/home/mike/.ipython']

    ---------------------------------------------------------------------------
    ImportError                               Traceback (most recent call last)
    <ipython-input-2-ab115a97c7b9> in <module>()
         10 print("sys.path:\n",sys.path)
         11 
    ---> 12 from textblob import TextBlob
         13 import nltk
         14 from scipy import spatial

    ImportError: No module named 'textblob'

And works well with the interpreter

(mybot_env) mike@mike-thinks:~/Programming/mybot$ python
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import textblob
/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
>>> 

To solve the problem, I tried

python -m pip install ipykernel
python -m  ipykernel install

But it does not work.

    
asked by anonymous 03.08.2018 / 12:47

0 answers