Yacine Rouizi
Yacine Rouizi

Reputation: 1460

ModuleNotFoundError: No module named 'jupyter_tabnine'

I tried to install jupyter tabnine extension like this:

pip3 install jupyter-tabnine
jupyter nbextension install

with the second command I have this error:

Installing /home/rouizi/.local/lib/python3.6/site-packages/jupyter_tabnine/static -> jupyter_tabnine
Traceback (most recent call last):
  File "/home/rouizi/.local/bin/jupyter-nbextension", line 11, in <module>
    sys.exit(main())
  File "/home/rouizi/.local/lib/python3.6/site-packages/jupyter_core/application.py", line 268, in 
launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/rouizi/.local/lib/python3.6/site-packages/traitlets/config/application.py", line 664, in 
launch_instance
    app.start()
  File "/home/rouizi/.local/lib/python3.6/site-packages/notebook/nbextensions.py", line 983, in start
    super(NBExtensionApp, self).start()
  File "/home/rouizi/.local/lib/python3.6/site-packages/jupyter_core/application.py", line 257, in start
    self.subapp.start()
  File "/home/rouizi/.local/lib/python3.6/site-packages/notebook/nbextensions.py", line 711, in start
    self.install_extensions()
  File "/home/rouizi/.local/lib/python3.6/site-packages/notebook/nbextensions.py", line 690, in 
install_extensions
    **kwargs
  File "/home/rouizi/.local/lib/python3.6/site-packages/notebook/nbextensions.py", line 220, in 
install_nbextension_python
    destination=dest, logger=logger
  File "/home/rouizi/.local/lib/python3.6/site-packages/notebook/nbextensions.py", line 121, in 
install_nbextension
    ensure_dir_exists(nbext)
  File "/home/rouizi/.local/lib/python3.6/site-packages/jupyter_core/utils/__init__.py", line 13, in 
ensure_dir_exists
    os.makedirs(path, mode=mode)
  File "/usr/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter'

So I tried with sudo:

sudo jupyter nbextension install --py jupyter_tabnine

Traceback (most recent call last):
  File "/snap/jupyter/6/bin/jupyter-nbextension", line 11, in <module>
    sys.exit(main())
  File "/snap/jupyter/6/lib/python3.7/site-packages/jupyter_core/application.py", line 266, in 
launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/snap/jupyter/6/lib/python3.7/site-packages/traitlets/config/application.py", line 658, in 
launch_instance
    app.start()
  File "/snap/jupyter/6/lib/python3.7/site-packages/notebook/nbextensions.py", line 988, in start
    super(NBExtensionApp, self).start()
  File "/snap/jupyter/6/lib/python3.7/site-packages/jupyter_core/application.py", line 255, in start
    self.subapp.start()
  File "/snap/jupyter/6/lib/python3.7/site-packages/notebook/nbextensions.py", line 716, in start
    self.install_extensions()
  File "/snap/jupyter/6/lib/python3.7/site-packages/notebook/nbextensions.py", line 695, in 
install_extensions
    **kwargs
  File "/snap/jupyter/6/lib/python3.7/site-packages/notebook/nbextensions.py", line 211, in 
install_nbextension_python
    m, nbexts = _get_nbextension_metadata(module)
  File "/snap/jupyter/6/lib/python3.7/site-packages/notebook/nbextensions.py", line 1122, in 
_get_nbextension_metadata
    m = import_item(module)
  File "/snap/jupyter/6/lib/python3.7/site-packages/traitlets/utils/importstring.py", line 42, in 
import_item
    return __import__(parts[0])
ModuleNotFoundError: No module named 'jupyter_tabnine'

It seems that the module jupyter_tabnine is not found, how do I fix this ?

Upvotes: 2

Views: 2884

Answers (2)

wen xu
wen xu

Reputation: 61

I got the same problem, but it seems solved by the following upgrade:

pip3 install jupyter-tabnine --upgrade

If not work for you, then try sudo:

 sudo pip3 install jupyter-tabnine --upgrade

After upgrade I try and problem solved:

sudo jupyter nbextension install --py jupyter_tabnine

Hope yours work through.

Upvotes: 5

Kamal
Kamal

Reputation: 21

My Dear I suggest you to follow my below method and you love to use it

  1. pip install jupyter_contrib_nbextensions
  2. jupyter contrib nbextension install --user
  3. Start jupyter notebook
  4. One of the tabs should now show "Nbextensions"
  5. There, you will find "Hinterland". Check the box to enable.

Must Try

Upvotes: 2

Related Questions