Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter Notebook extensions within Jupyter Lab

Is it possible to use notebook extensions (nbextensions) within Jupyter Lab?

I think my extensions are enabled... I call jupyter nbextension enable on them beforehand. But I don't see them in notebooks from within Jupyter Lab.

like image 332
grisaitis Avatar asked Oct 10 '18 20:10

grisaitis


People also ask

How do you add extensions to JupyterLab?

Find extensions. You can search on GitHub for "JupyterLab extensions". You can also use the "Extension panel" in the JupyterLab interface to find a link to an extension npm page. (After version 3 is released users should be able to install "personal" extensions from there. )

How do you put extensions in a Jupyter Notebook?

After installing, open Jupyter Notebook. You will see a new tab, “Nbextensions” will appear in the menu (as shown in the image). When you click it, you will see a list of available extensions that you can use to increase your productivity of Jupyter Notebook.

How do I view JupyterLab extensions?

You can use the Extension Manager in JupyterLab to manage extensions that are distributed as single JavaScript packages on npm. The Extension Manager is in the left sidebar.

Does JupyterLab include Jupyter Notebook?

Jupyter notebooks (. ipynb files) are fully supported in JupyterLab. The notebook document format used in JupyterLab is the same as in the classic Jupyter Notebook. Your existing notebooks should open correctly in JupyterLab.


1 Answers

No, it is not possible to use a Notebook Classic extension in JupyterLab.

Though a great deal of effort has been made to make the notebook UI in JupyterLab look and feel like the UI in Notebook Classic, on the backend they do not share a code base. Thus, nbextensions for Notebook Classic have zero fundamental compatibility with JupyterLab. Beyond that, as @madhu94 points out, the extension API (how extensions should be structured, required methods, etc) are completely different in Classic and Lab.

There are some examples of projects with both an nbextension for Notebook Classic and a labextension for JupyterLab (eg jupyter-widgets/ipywidgets). In these cases the project will have separate code for each kind of extension.

like image 152
tel Avatar answered Sep 28 '22 04:09

tel