Install the JupyROOT Python kernel in JupyterHub


October 11, 2022

After installing ROOT’s conda package, for example with micromamba:

micromamba create -n root -c conda-forge root python==3.8 matplotlib

and then installing the kernel for JupyterHub:

ipython kernel install --name root --user

Unfortunately import ROOT gives the error:

ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
  LC_ALL=C x86_64-conda-linux-gnu-c++   -DNDEBUG -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.include/,${' -e '/^ \/.*++/p' -e '}'
Results was:
With exit code 0

The fix, found after more than 1 hour of search, is at

Edit the kernel.json file and modify the PATH variable:

 "argv": [
 "display_name": "root",
 "language": "python",
 "metadata": {
  "debugger": true
 "env": {
   "PATH": "/home/jovyan/micromamba/envs/root/bin/:${PATH}"