Solved here: https://github.com/ipython-contrib/IPython-notebook-extensions/issues/282. The ~/.jupyter/nbconfig/notebook.json file must be edited to use python-markdown/main instead of python-markdown.
Jupyter Notebook Extensions Fail to Load - Stack Overflow
python - How to add automatically extension to Jupyter (ipython) notebook? - Stack Overflow
IPython: load extension automatically upon start - Stack Overflow
python - Error loading Jupyter Notebook Extensions - Stack Overflow
Solved here: https://github.com/ipython-contrib/IPython-notebook-extensions/issues/282. The ~/.jupyter/nbconfig/notebook.json file must be edited to use python-markdown/main instead of python-markdown.
More generally this kind of error can also happen after you've upgraded Jupyter/Python/etc and some of the extensions are not supported by your updates. You can then just disable them from the Nbextensions configuration tab - you may find that they're the extensions that are shown as incompatible - which can be disabled by ticking the 'disable configuration for nbextensions without explicit compatibility' checkbox.
From the IPython documentation:
Using extensions
To load an extension while IPython is running, use the
%load_extmagic:In [1]: %load_ext myextensionTo load it each time IPython starts, list it in your configuration file:
c.InteractiveShellApp.extensions = [ 'myextension' ]
Hope that helps
$ cat ~/.ipython/profile_default/startup/load_extensions.py
get_ipython().run_line_magic('load_ext', 'autoreload')
I had the same problem. Here is how I solved it.
I have downloaded Anaconda python version 3.7. I already had Python 3.6.7 on my system.
I'd get this error if I did:
pip install jupyter_contrib_nbextensions
To solve it, I did:
python3.7 -m pip install jupyter_contrib_nbextensions
I have not tried this, but this could solve your problem too:
conda install -c conda-forge jupyter_nbextensions_configurator
So I guess the problem is because of there being multiple versions of Python on your system. The one which Anaconda uses and the one which the "normal pip" uses are probably different.
I solved this problem by removing jupyter-notebook, jupyter_contrib_nbextensions, and jupyter_nbextensions_configurator, and starting it from scratch.
Note: It only works on Anaconda environment.
Uninstallation
For the different source of installation, you can remove these package through:
pip uninstall jupyter
pip uninstall jupyter_contrib_nbextensions
pip uninstall jupyter_nbextensions_configurator
or
conda remove --force jupyter notebook
conda remove --force jupyter_nbextensions_configurator
conda remove --force jupyter_contrib_nbextensions
But I'd advise you to run both of the above commands.
Installation
It's better to install all the packages from anaconda:
conda update notebook
conda install jupyter notebook
conda install -c conda-forge jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_contrib_nbextensions
Hi Jupyter community! I'm primarily a Python/data analysis developer trying to create my first JupyterLab extension. I'm stuck at a really frustrating stage and could use some guidance.
What I'm Trying to Build: A JupyterLab extension that shows tooltips of Python function content when hovering over markdown links in Jupyter notebooks. For example, if I have a function:
def my_function():
"""
My docstring
"""
return "Hello"
And a markdown link [Click here](#my_function), hovering over it should show the function content.
My Current Setup:
-
JupyterLab 4.2.6
-
Python 3.10
-
Using virtual environment
-
Project structured following JupyterLab extension template
-
GitHub repo: https://github.com/Warren8824/jupyter-hover-tooltip.git
The Problem: Even though I'm just trying to get the basic extension recognized before implementing Python functionality:
-
The extension builds without errors:
npm run build # Succeeds pip install -e . # Succeeds jupyter labextension develop . --overwrite # Succeeds
2. Server logs show it's loading:
jupyter_hover_tooltip | extension was successfully loaded
3. But the extension is invisible in:
-
jupyter labextension listoutput -
JupyterLab's Extension Manager UI
Key Files in Place:
-
setup.py with proper Python packaging
-
package.json with JupyterLab extension metadata
-
init.py with proper extension registration
-
webpack.config.js for building JavaScript components
What's Confusing Me:
-
I understand Python packaging but this hybrid Python/JavaScript setup is new to me
-
Everything seems to build correctly but JupyterLab won't recognize the extension
-
I had it working once before but can't reproduce that success
-
Can't even get to testing the actual Python functionality because I'm stuck at setup
Questions:
-
Is this a Python packaging issue or a JupyterLab configuration problem?
-
Are there specific Python-side debugging steps I should take?
-
How can I verify if my Python package is correctly registering with JupyterLab?
I've spent over a day just trying to get past this setup stage. As someone who usually works with pure Python, I feel like I'm missing something fundamental about how Python packages interact with JupyterLab's extension system.
All code is in the GitHub repo. Any help, especially from Python developers who have experience with JupyterLab extensions, would be greatly appreciated!
Environment Details:
jupyter --version output: IPython : 8.29.0 ipykernel : 6.29.5 ipywidgets : 8.1.5 jupyter_client : 8.6.3 jupyter_core : 5.7.2 jupyter_server : 2.14.2 jupyterlab : 4.2.6 nbclient : 0.10.0 nbconvert : 7.16.4 nbformat : 5.10.4 notebook : 7.2.2 traitlets : 5.14.3