Some instruction to use Jupyter Notebook. For CERN users, it's also possible to use SWAN directly with ROOT+Python+Jupyter binding and kernel service.
pip3 install jupyter
Other options of installation can be found here.
jupyter notebook
This will print some information about the notebook server in your terminal, and open your default web browser to this URL.
The following code should open the given notebook in the currently running notebook server, starting one if necessary.
jupyter notebook notebook.ipynb
More details can be found from the official users guide.
Here is a script converttonotebook.py used to convert ROOT official tutorial codes to notebooks.
But it requires some header lines at the beginning of the macros:
/// \file
/// \ingroup tutorial_fit
/// \notebook
/// Simple fitting example (1-d histogram with an interpreted function)
///
/// \macro_image
/// \macro_output
/// \macro_code
///
/// \author XXX
or for pyroot
## \file
## \ingroup tutorial_pyroot
## \notebook
## Fit example.
##
## \macro_image
## \macro_output
## \macro_code
##
## \author XXX