Kernel failed using ROOT C++ in jupyter notebook

Hi Experts,

I have newly updated my ubuntu os to 21.04 (Xorg), I am struggling using c++ in the notebook. The kernel is failing repeatedly. I am attaching the errors.

I have used this official link for root using conda environment. Installing ROOT - ROOT
Please help me fix this issue.

Thanks
Priyanka


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hello,

Is this a problem you only see in Jupyter?

If you start the ROOT prompt by typing root and type some C++ code there, does it work?

Hi @etejedor

yes it does work. But some peculiar thing i faced in terminal also, i am attaching the screenshot.

Here in the above screenshot, when i directly try to start root prompt inside a directory this error comes.

but here in the 2nd snapshot, when i try to start root in the home folder, then goes to Downloads by cd command it works perfectly fine.

Is this related to upgraded ubuntu ?
Please help me solving this issue.

Thanks

Hello,

You said you installed ROOT via conda, but it seems you are using a root installation in your home directory (/home/priyanka/root_install) and you are setting your environment with thisroot.sh?

Perhaps there are two installations? If you are using the conda one, you just need to activate the conda environment (no thisroot.sh needed).

yes,

I first installed using conda, when it didn’t work for jupyter notebook and so i installed using the ‘build from souce’ method. (2 installation done)

What i should do now ?
Thanks

I’d suggest you use the conda installation. For that you need to activate the conda environment. See instructions here:

You’ll need to install jupyter also inside that conda environment and then try again to run a notebook from that environment.

Hi,
I have already installed following it, but the issue is “kernel failed”. This I only face when i use ROOT c++ instead of ipykernel. Python works fine but c++ doesn’t.

Priyanka

From the first image you sent it seems there is some interference between the conda ROOT and the other ROOT you installed - you activate the conda environment but the error trace shows that the other ROOT is kicking in (the one installed in your home).
Please make sure that no environment is set for the other ROOT when you activate the conda environment for the conda ROOT.

To make sure no other env is set or no interference, what i should recheck ? I already commented the source …/…/…thisroot.sh from the bashrc. Still it’s not working. The same error, kernel died and can’t load library error i am getting.

Thanks
Priyanka

Hi,

I’d check LD_LIBRARY_PATH and PATH to see if they point to the ROOT in your home dir, it must be pointed to from somewhere since it ends up being used.

I don’t know much about the library stuffs but i have attached the screenshot, will it help you to help me ?

Thanks
Priyanka

As you can see both LD_LIBRARY_PATH and PATH contain your other ROOT installation (the one in /home/priyanka/root_install, that explains the interference. I’d start a fresh terminal session that doesn’t have these settings.

But for that what i should do ? It’s a default library path. If i start a new terminal also it won’t change. Can you suggest explicitly ?

Thanks
Priyanka

If it won’t change with a new terminal, it’s because you have that setting somewhere (e.g. bashrc), so I’d remove the setting from there.
If you can’t find how to remove the setting, just set those variables to a value that does not contain the ROOT home directory installation (export LD_LIBRARY_PATH=...). They have to contain what conda set, though, otherwise conda won’t work.

I have uninstalled root, which i build from source. Now only root with conda env remains. But i can’t see the ROOT c++ kernel in the notebook. Screenshot attached.

Thanks
Priyanka

To make sure i am not doing anything wrong i have removed the root env from conda and reinstalled it, screenshot is attached. Only python package is installed and again there is not ROOT c++ kernel only ipykernel is there. Is there some other settings for ROOT c++, please let me know.

Thanks
Priyanka

Hello,

One last thing to try, is to start Jupyter with root --notebook instead of jupyter, and see if that shows the ROOT C++ kernel. Otherwise I’ll ask the maintainer of the ROOT conda package is he has any idea of what can be wrong.

yes root --notebook is working. I already tried two days back following this https://anaconda.org/conda-forge/root/ link. I don’t know why jupyter didn’t work. Anyway, thanks a lot for your help.

Thanks
Priyanka

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.