iucar / rpms / root

Forked from rpms/root 3 years ago
Clone
69d6612
While all is fine in Fedora and all packages needed to run the JupyROOT
69d6612
notebook are available there, this is not true for EPEL.
69d6612
69d6612
Hopefully the ipython/jupyter stack will at some point be available in
69d6612
EPEL too, but at this point in time it is not.
69d6612
69d6612
However, it is possible to work around this issue using a python
69d6612
virtual environment.
69d6612
69d6612
First, install the required root packages (as root):
69d6612
69d6612
$ yum install root root-notebook python3-jupyroot
69d6612
69d6612
Then return to your non-root user and create a python3 virtual
69d6612
environment:
69d6612
69d6612
$ python3 -m venv ~/jupyter-env
69d6612
69d6612
Activate the environment:
69d6612
69d6612
$ . ~/jupyter-env/bin/activate
69d6612
69d6612
Then install the missing packages in the virtual environment using pip:
69d6612
69d6612
$ pip install notebook metakernel
69d6612
69d6612
Then start the root notebook:
69d6612
69d6612
$ PYTHONPATH=~/jupyter-env/lib/python3.6/site-packages root --notebook
69d6612
69d6612
And that is it.
69d6612
69d6612
If you want to start it again and you haven't removed the virtual
69d6612
environment, only two of the steps are necessary:
69d6612
69d6612
$ . ~/jupyter-env/bin/activate
69d6612
$ PYTHONPATH=~/jupyter-env/lib/python3.6/site-packages root --notebook