Skip to content

ModuleNotFoundError: No module named 'notebook.nbextensions' #1667

Open
@wahyudizulhaidar

Description

@wahyudizulhaidar

I have problems when installing jupyter_contrib_nbextensions for the purpose of installing jupyter-tabnine, I follow the steps here docs

When following the second step link, the problem is as follows

C:\Windows\System32>jupyter contrib nbextension install --user
Traceback (most recent call last):
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python312\site-packages\jupyter_contrib_core\notebook_compat\nbextensions.py", line 6, in <module>
    from notebook.extensions import BaseExtensionApp
ModuleNotFoundError: No module named 'notebook.extensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python312\site-packages\jupyter_contrib_core\notebook_compat\nbextensions.py", line 10, in <module>
    from notebook.nbextensions import BaseNBExtensionApp
ModuleNotFoundError: No module named 'notebook.nbextensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python312\Scripts\jupyter-contrib.EXE\__main__.py", line 7, in <module>
  File "C:\ProgramData\anaconda3\Lib\site-packages\jupyter_core\application.py", line 283, in launch_instance
    super().launch_instance(argv=argv, **kwargs)
  File "C:\ProgramData\anaconda3\Lib\site-packages\traitlets\config\application.py", line 1073, in launch_instance
    app = cls.instance(**kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\traitlets\config\configurable.py", line 583, in instance
    inst = cls(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python312\site-packages\jupyter_contrib_core\application.py", line 27, in __init__
    self._refresh_subcommands()
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python312\site-packages\jupyter_contrib_core\application.py", line 43, in _refresh_subcommands
    get_subcommands_dict = entrypoint.load()
                           ^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\pkg_resources\__init__.py", line 2781, in load
    return self.resolve()
           ^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\pkg_resources\__init__.py", line 2787, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python312\site-packages\jupyter_contrib_nbextensions\application.py", line 7, in <module>
    from jupyter_contrib_core.notebook_compat.nbextensions import ArgumentConflict
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python312\site-packages\jupyter_contrib_core\notebook_compat\nbextensions.py", line 12, in <module>
    from ._compat.nbextensions import BaseNBExtensionApp
  File "C:\Users\USERNAME\AppData\Roaming\Python\Python312\site-packages\jupyter_contrib_core\notebook_compat\_compat\nbextensions.py", line 35, in <module>
    from notebook.nbextensions import (
ModuleNotFoundError: No module named 'notebook.nbextensions'

try to use --system instead of --user but it didn't work and and the problem remains the same.

I have this version
Jupyter Notebook : 7.3.2
Jupyter Lab: 4.3.4
Python : 3.11.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions