IPython.notebook methods not available in JupyterLab notebook

In a plain Jupyter notebook, I can call methods from IPython.notebook module or Jupyter.notebook module to perform cell-specific operations. However, when I try using the same code in a notebook within JupyterLab, I get an error saying IPython is not defined or Jupyter is not defined. Is there a way I can access these modules within the notebook in JupyterLab environment?

No, these APIs don’t exist, and generally the application API is intentionally separated more from the what e.g. kernels can generate.

It is possible to configure your jupyterlab application with --expose-app-in-browser, but this it is not something one can generally rely on, and will be a different API altogether, because of the multi-document scope of Lab.

There are a few bridges that offer some additional features, such as ipylab.

1 Like