- #How to install jupyter notebook extensions how to#
- #How to install jupyter notebook extensions download#
However, it does mean that the above "naive postinst trigger" is not technically correct, and is missing information. In practise, I haven't seen anyone use anything other than the "notebook" value, and I don't know how important or common the other cases are. see above again) - instead of implicitly being "notebook". the that we got rid of earlier), the section is automatically taken from the "section" key within that python module (e.g. Or, if we were enabling a python module (that wraps the plain extension e.g.
#How to install jupyter notebook extensions how to#
However, it's unclear how to write the trigger. The up-side of this approach is that extension packages don't need an extra Depends, and they don't need to do any extra work in their own packages. See on what triggers are, and I'm sure you've noticed the "processing triggers" messages for man-db, etc. Postinst triggers hook in python-notebook, python3-notebook edit the file mentioned above, so it doesn't matter which one is run.Īnother downside is that every jupyter-notebook extension would need to have this complexity. $ python3 -m notebook.nbextensions enable jupyter-js-widgets/extensionÄepending on what is available. $ python -m notebook.nbextensions enable jupyter-js-widgets/extension # or One downside is that I would have to add a hard Depends: python3-notebook | python-notebook to jupyter-nbextension-jupyter-js-widgets, and then run either Postinst hook in all notebook extension packages There are two ways of automating this, and I'm not sure which way is the best.
What "enable" does is add an entry to /etc/jupyter/nbconfig/notebook.json. But now I'm having trouble trying to automate away the "enable" step. It contains some metadata to describe where it should be installed to, see, but otherwise the "contents" is simply /usr/share/jupyter/nbextension/jupyter-js-widgets/extension.js in my specific case is widgetsnbextension. So instead of installing the files as a python module (whose sole purpose is to wrap non-python files), then calling "install" at runtime to put them into /usr/share/jupyter/nbextension, I'm installing these directly to the latter location, and omitting from the filesystem. The "install" step is basically redundant for Debian, it just involves copying files to /usr/share/jupyter/nbextension. Ideally users shouldn't need to run these steps, above. We're trying to figure out how to deal with this in Debian. $ jupyter nbextension install # or python/python3 -m notebook.extension install
#How to install jupyter notebook extensions download#
Users typically download an extension, then run something like this:
Message-id: Notebook allows for the installation of "extensions".To: Development issues of sagemath and related tools, Subject: How to deal with jupyter notebook extensions.How to deal with jupyter notebook extensions