神刀安全网

Notebook 4.2

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:

  1. nbextensions, which are JavaScript extensions that run in your browser. These can modify the UI or behavior of the notebook, such as adding buttons to your toolbar, new keyboard shortcuts, etc.
  2. 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:

  1. better symmetry between handling of serverextensions and nbextensions
  2. allowing enabling nbextensions system-wide
  3. working better with the Python sys.prefix for installing/enabling extensions using packages and environments, such as conda packages or python wheels
  4. allowing installation via Python packages

In general, installing and enabling extensions is a two step process:

  1. install the extension:

    jupyter nbextension install /path/to/myextension 
  2. 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 .

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Notebook 4.2

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮