Before I get into details, I’ll ask the basic question that might lead me to the answer: What is the component within ROOT and Jupyter that causes images to be displayed on a notebook page?
The issue in more detail:
I have a working JupyterHub installation running C++ and Python kernels with ROOT 6.26 under AlmaLinux 9.1. The purpose of the installation to make these kernels available for the students at our lab.
In order to provide my users with the latest and greatest, I tried updating the software framework with:
dnf -y update root\*
The results made me glad that I put the installation on a virtual machine so I could fall back to an earlier instance. When ROOT was updated to 6.28, it introduced a flaw in Jupyter: When I try to
Draw something that puts actual graphics on the web page, the ROOT kernel (whether C++ or Python) dies. What’s more, it does so without leaving any form of error message in
/var/log/messages or anywhere else that I’ve been able to locate.
TH1D hist("example","example",100,-3,3); hist.FillRandom("gaus",10000); hist.Draw(); c1->Draw();
In my 6.28.02 Jupyter installation, the kernel will die on the fourth line.
This issue does not occur in my ROOT 6.26 installation. That works fine.
This is not a problem with ROOT itself. If I run ROOT via the command line, or run
ipythonand type similar commands, the plot is displayed. It’s only an issue if I try to
Drawfrom within Jupyter.
The issue is located in my JupyterHub installation somewhere. I confirmed this by creating a Docker container with AlmaLinux 9 and ROOT 6.28/02 (
wgseligman/jupyter-pyroot:latest-arm64if you’re using an M1/M2 Mac). The issue does not occur within that container.
I’ve done more than just
dnf -y install root\*as I attempted to assess the issue. I updated everything in the system with
dnf -y update; I updated all the pip packages including:
pip3 install --upgrade jupyter jupyterlab jupyterhub "jupyter-server<2.0.0"
The issue persists.
My jupyterhub installation is complex, since it includes more than just the C++ and Python ROOT kernels. I’d father not have to rebuild it from scratch.
My conclusion is that there’s some piece of the Jupyter installation that I did not upgrade properly. However, without any error messages, I can’t determine what it is.
This leads back to my initial question: What part of ROOT+Jupyter actually puts images into the Jupyter notebook page? If I at least knew that, perhaps I could track down what’s going wrong.
ROOT Version: 6.28.02
Platform: AlmaLinux 9
Compiler: gcc 11.3.1