Enabling Jupyter Notebook extensions#
Jupyter contributed notebook extensions are community-contributed and maintained plug-ins to the Jupyter notebook. These extensions serve many purposes, from pedagogical tools to tools for converting and editing notebooks.
Extensions are often added and enabled through the graphical user interface of the notebook. However, this interface only makes the extension available to the user, not all users on a hub. Instead, to make contributed extensions available to your users, you will use the command line. This can be completed using the terminal in the JupyterHub (or via SSH-ing into your VM and using this terminal).
Enabling extensions via the command line#
There are multiple ways to install contributed extensions. For this example, we will use
sudo -E pip install jupyter_contrib_nbextensions
Next, add the notebook extension style files to the Jupyter configuration files.
sudo -E jupyter contrib nbextension install --sys-prefix
Then, you will enable the extensions you would like to use. The syntax for this is
jupyter nbextension enablefollowed by the path to the desired extension’s main file. For example, to enable scratchpad, you would type the following:
sudo -E jupyter nbextension enable scratchpad/main --sys-prefix
When this is completed, the enabled extension should be visible in the extension list:
jupyter nbextension list
You can also verify the availability of the extension via its user interface in the notebook. For example, spellchecker adds an ABC checkmark icon to the interface.