Unable to start JupyterNotebook with ROOT Cpp kernel.
The jupyter output states:
16:01:59.582 [error] Kernel died Error: spawn python3.9 ENOENT
It runs normally in the browser by using root --notebook from the terminal.
I have a theory for this,
If I start root --notebook after activating the wrong Python environment, I get the same error as above.
So when I use VSCode, the default Python environment is different from the one on which the root was built. I further confirmed this by activating my environment in my .bashrc and now the notebook works in VSCode.
Is there any way to rectify this issue such that when the notebook is launched it uses the python environment on which it was built.
ROOT Version: 6.29/01 (built from source) Platform: linuxx8664gcc (Ubuntu 23) Compiler: Not Provided
So when I use VSCode, the default Python environment is different from the one on which the root was built. I further confirmed this by activating my environment in my .bashrc and now the notebook works in VSCode.
Yes indeed this is the main culprit, vscode won’t automatically source your ROOT installation, especially when you have built it manually and you need to run . thisroot.sh to fill the environment.
So, let me try out to discuss possible ways out with you here, as I don’t know everything beforehand.
One possibility was already provided by you, probably vs code picks up the environment from ~/.bashrc file so that allows using the jupyter notebook integration of vs code with the source ROOT installation.
Dear @vpadulan ,
Thank you for the response. It was very helpful.
I get the issue with VSCode not setting the environment variable.
But, I get the same Kernel Error even if I start root --notebook from a different Python environment.
So is there something to do there?
P.S. Sorry if this was a feature instead of a bug.