JupyROOT library error

While trying to get the C++ ROOT notebooks working with Jupyter, I cannot start the kernel within a new notebook. I launched it through root --notebook, and the startup hangs at

I looked through the $ROOTSYS/lib directory, and that compiled shared object does not show up. I did not see any documentation about explicitly compiling for Jupyter support, so I don’t know if that is the problem.

(Hopefully) Relevant computer information:

$ jupyter --version
$ python --version
$ root-config --version
$ root-config --cflags
-pthread -std=c++11 -Wno-deprecated-declarations -m64 -I/opt/root/include
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
$ uname -a
Linux ARES2m 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Note that I can import ROOT fine within python, and run root interactively fine. I just can’t get the notebook version to work. My path includes $ROOTSYS/bin, and pythonpath includes $ROOTSYS/lib (set up with . $ROOTSYS/bin/thisroot.sh.


Hi Mike,

how did you configure and build ROOT?


You probably forgot to set the http flag when configuring:

cmake -Dhttp=ON /path/to/src


thanks for reminding about “-Dhttp=ON”. This one is necessary for javascript visualisation and is very useful to set. On the other hand I am not sure under which circumstances this can affect the presence of the jupyroot library: some more investigation about the actual building procedure is needed.


While configuring with cmake, there was any message or trouble finding Python?

I use

./configure linuxx8664gcc make -j 9
to perform a local install. So just the defaults being turned on. If the http flag is required, I canl try compiling again with it included.

And no, no trouble finding python2 or any associated libraries. ROOT works fine with python on my machine, except when Jupyter is involved.

Sorry, I didn’t see the notification for your responses.

I think this is a duplicate of
sft.its.cern.ch/jira/si/jira.is … -7891.html

You should use cmake instead of the old method (configure):

cd /opt/root6/
cmake -Dhttp=ON /opt/root6_src
make -j 9

See new build instructions.

OK, I will try installing it with cmake, following along with that post if anything goes awry.


OK, things progressed further, with no errors when installing or running ROOT. It also still imports fine with python. I’m encountering a new error, though, but it has to do with metakernel, which I did install.

[W 15:40:21.419 NotebookApp] Timeout waiting for kernel_info reply from 08d00167-8560-41f1-8bd8-551a5917dfb6 [IPKernelApp] ERROR | Can't load '${HOME}/.local/lib/python2.7/site-packages/metakernel-0.12.4-py2.7.egg/metakernel/magics/shell_magic.py': error: Timeout exceeded.
metakernel was installed with pip install metakernel --user, and the python script in question is there in the directory.


This is still ubuntu, right?
Can you check if the file actually exists and is not corrypted?


Yes, Ubuntu/Linux Mint.

The file exists, and does not appear to be corrupted. Running python2 from the directory allows me to import the module fine.

EDIT: I can now run basic C++ ROOT notebooks, but I am confused about the timeout encountered.


great that you could move forward. Thanks for reporting.
By chance, could it be that you were running a Python3 notebook after having built ROOT against Python2?


I did not try running a python2 notebook through Jupyter and importing ROOT, just the regular C++ ROOT notebook, if I am understanding your question correctly.

Right. The ansatz indeed does not apply in this case as you were running the c++ kernel.