To install and enable the nbdime Jupyter extensions, run the following command:
nbdime extensions --enable [--sys-prefix/--user/--system]
Or, if you prefer full control, you can run the individual steps:
jupyter serverextension enable --py nbdime [--sys-prefix/--user/--system]
jupyter nbextension install --py nbdime [--sys-prefix/--user/--system]
jupyter nbextension enable --py nbdime [--sys-prefix/--user/--system]
jupyter labextension install nbdime-jupyterlab
The preceding code will install the nbdime notebook server extension, the notebook frontend extension, and the JupyterLab frontend extension.
The --system (default) and --user flags determine which users the extensions will be configured for. Note that you should use --sys-prefix to only enable it for the currently active virtual environment (for example, with conda or virtualenv).