We have just released version 4.2 of the Jupyter notebook package. There are the usual bugfixes, and a few improvements. You can see a summary of changes in the docs , or see all the changes on GitHub .
Altogether, 21 authors contributed to 53 pull requests to make this release.
The primary feature of 4.2 is improvements to the extension system for the notebook. The notebook can be extended in two ways:
- serverextensions, which modify the Python webserver. These can add new HTTP endpoints, register extra events to run when you save your notebook, etc.
The improvements are focused on making installing and enabling extensions easier, including:
- better symmetry between handling of serverextensions and nbextensions
- allowing enabling nbextensions system-wide
- working better with the Python
sys.prefixfor installing/enabling extensions using packages and environments, such as conda packages or python wheels
- allowing installation via Python packages
In general, installing and enabling extensions is a two step process:
install the extension:
jupyter nbextension install /path/to/myextension
enable the extension
jupyter nbextension enable myextension/main
Installation is system-wide by default, but you can specify an installation to be just for you with
--user . Enabling an extension is per-user by default, but you can enable an extension system-wide with
--system . You can install or enable an extension using the Python
sys.prefix by using the
--sys-prefix option available in either command. For example, to make a conda package that includes an extension, you should install the extension using
--sys-prefix when building the package.
Python packages can specify information about what nbextensions and serverextensions they provide. These can be installed with:
jupyter nbextension install --py packagename jupyter serverextension enable --py packagename
For more information on installing extensions from Python packages, see the docs .