Jupyter is a suite of tools for interactive scientific computing. Jupyter was developed from IPython, but separates components which are python-specific and applicable to other languages, allowing a common interface to be used with different programming languages.
The name Jupyter referred to Julia, Python and R, the initial languages which were implemented.
An interactive session in Jupyter consists of a frontend (the console, GUI or web interface in which code is entered and results displayed), and a kernel (the process responsible for executing your code).
The original ipython console application is therefore split into the terminal interface (jupyter-console) and the python kernel (ipykernel).
The frontend and kernel communicate using the ZMQ messaging library. It is possible for the kernel and frontend to run on different systems using network transports.
Web-based interactive notebook. This runs a local web server which displays the code and results in your web browser. By default, the server listens on localhost:8888 for connections from the local machine only.
No authentication is performed by default, so you should not configure this to listen for external connections since that will allow anyone to execute code as the current user.
A systemd user unit is installed, but not enabled by default. Enabling this will cause the notebook server to be started automatically when you log in. (This only really makes sense for single-user laptop or desktop machines).
systemctl --user enable jupyter-notebook.service systemctl --user start jupyter-notebook.service
Terminal interface to Jupyter. Compared to simple REPL interfaces like the default python one, it provides better highlighting, autocompletion and magic functions.
jupyter console --kernel python2
QT enhanced console. Compared to the text console, this also provides mouseover help, and can display graphical output.
jupyter qtconsole --kernel python3
Tool for converting notebooks to other formats, such as HTML, PDF or DOCX.
PDF output requires a LaTeX installation, which is not installed by default.
jupyter nbconvert --to html mynotebook.ipynb
Required to run python 2 or 3 code in a Jupyter session.
Widgets are a notebook extension which allows code to be coupled with controls - sliders, dropdowns, etc - to quickly re-run functions with new options. To use widgets in a notebook session you need the server-side package (the JS and CSS used to display them in the notebook), jupyter-nbextension-jupyter-js-widgets, and a language-specific library to allow them to interact with your code. For python, the client-side library is python-ipywidgets.
Jupyter generates config files in ~/.jupyter which contain all allowed options and some documentation. (Everything is commented out by default).
Python 2 vs 3
By default, Jupyter tools depend on the Python 3 versions of the underlying libraries (eg, jupyter-notebook depends on python3-notebook).
Running Python 2 code in a notebook or console session requires the Python 2 kernel (python-ipykernel), but it doesn't matter which version of Python the frontend is using. You almost certainly don't need to install the Python 2 notebook server unless you have code which somehow needs to interact directly with the web server. The Python 2 frontend libraries (eg, python-notebook) will probably be removed in future if nothing is using them.
Kernels are defined by JSON files in /usr/share/jupyter/kernels/KERNEL_NAME/kernel.json.
You can list installed kernels with jupyter kernelspec list.
Some further jupyter-related packages which might be interesting:
- jupyterlab (multi-user notebook server)
- irkernel (R kernel)
- ijulia (Julia kernel)
- ihaskell (Haskell kernel)
Relevant people for these packages can probably be found in #debian-science or #debian-python