Jupyter NbClassic
Jupyter NbClassic is an implementation of the classic Jupyter Notebook 6 as a Jupyter Server extension. It allows users to continue using the Notebook 6 tech-stack and its associated extensions and customizations alongside newer Jupyter environments like Notebook 7 or JupyterLab. The project is currently at version 1.3.3 and receives ongoing maintenance, primarily focusing on security and bug fixes while providing a stable, familiar interface. [1, 6, 7, 14]
Common errors
-
ModuleNotFoundError: No module named 'nbclassic'
cause The `nbclassic` package is either not installed in the active Python environment or its installation path is not correctly configured in your system's PATH, preventing Jupyter from finding it.fixEnsure `nbclassic` is installed in your active environment: `pip install nbclassic` or `conda install nbclassic`. If already installed, check your PATH environment variable or try launching with `python -m nbclassic`. -
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behavior is the source of the following dependency conflicts. notebook 6.5.1 requires nbclassic==0.4.5, but you have nbclassic 0.4.6 which is incompatible.
cause There is a version mismatch between the `notebook` package and `nbclassic`, where a specific version of `notebook` explicitly requires an incompatible version of `nbclassic`.fixDowngrade or upgrade `nbclassic` to match the version required by `notebook`, or upgrade both to compatible recent versions. For example, `pip install notebook==6.5.1 nbclassic==0.4.5` or `pip install --upgrade notebook nbclassic` to get the latest compatible versions. -
ImportError: cannot import name '_i18n' from 'jupyter_server.transutils'
cause This error typically occurs when `nbclassic` is attempting to import a utility from `jupyter_server` that has been moved or removed in a different version of `jupyter_server`, indicating an incompatibility between the two packages.fixUpgrade both `jupyter_server` and `nbclassic` to their latest compatible versions: `pip install --upgrade jupyter_server nbclassic` or `conda update jupyter_server nbclassic`. -
500: Internal Server Error (KeyError: 'terminals_available')
cause This server-side error, often appearing when launching `jupyter nbclassic` or attempting to open notebooks, is frequently due to an incompatibility or missing configuration related to terminal handling between `nbclassic` and `jupyter_server` versions.fixEnsure both `jupyter_server` and `nbclassic` are updated to their latest compatible versions: `pip install --upgrade jupyter_server nbclassic`. Additionally, ensure that the `jupyter-server-terminals` package is installed: `pip install jupyter-server-terminals`.
Warnings
- breaking Static asset paths for the classic Notebook were changed in nbclassic v1.3.2, breaking the ability to serve them from original endpoints. This was fixed in v1.3.3 by copying assets to legacy paths. Users on v1.3.2 may experience UI issues. [1]
- gotcha When nbclassic is installed alongside Jupyter Notebook 7 (or JupyterLab), its UI will be served under the `/nbclassic/tree` base path, rather than the default `/tree` path. This is to avoid conflicts with Notebook 7, which uses `/tree`. [10, 11]
- breaking Support for Python 3.8 was dropped in nbclassic v1.3.0. Attempts to install or run nbclassic on Python 3.8 or older will fail. [15]
- gotcha Older `notebook` package versions (e.g., `notebook==6.5.1`) might have strict dependency requirements on specific `nbclassic` versions (e.g., `nbclassic==0.4.5`). Installing a newer `nbclassic` (e.g., `0.4.6` or `1.x.x`) can lead to dependency conflicts during `pip install`. [16]
- breaking Entrypoints for extensions were renamed in NbClassic (e.g., `jupyter-nbclassic-extension`, `jupyter nbclassic-serverextension`, `jupyter-nbclassic-bundlerextension`). Older commands or configurations using `jupyter nbextension` for nbclassic might fail or target the wrong server. [7, 8]
- gotcha When configuring the startup directory for nbclassic (especially alongside JupyterLab >= 3), use `c.ServerApp.root_dir` in `jupyter_server_config.py` instead of the older `c.NotebookApp.notebook_dir` in `jupyter_notebook_config.py`. [18]
Install
-
pip install nbclassic
Imports
- NBClassicApp
from nbclassic.nbclassicapp import NBClassicApp
- NBClassicConfigShimMixin
from nbclassic.nbclassicapp import NBClassicConfigShimMixin
Quickstart
jupyter nbclassic