Problem importing ROOT in Jupyter logbook in visual studio code

Hi.
I am using Visual Studio Code and I cannot import ROOT in my Jupyter logbook.
What I am experiencing is essentially the same problem described in this post. When I work from the terminal within VSCode I can run “thisroot.sh” and importing ROOT in python works. The problem is that in the Jupyter logbook cell ROOT is still not found. I tried to run the “thisroot.sh” within the cell using subprocess.run("/opt/homebrew/bin/thisroot.sh") but that does not work.
I also tried to manually define dependencies like os.environ["$ROOTSYS"] = "/opt/homebrew/Cellar/root" but that also does not do.
Any help is appreciated.
Thank you

_ROOT Version: 6.32 (home-brew installation)
_Platform: Sonoma 14.5


Hi Luca,

We did not get to this issue yet due to effort constraints. Is there a chance you can dive into the issue and perhaps solve it for the community? We’ll be here to support you, of course.

Best,
Danilo

Hi Danilo.
Thank you for following up on this.
Sure, I can do that. Yesterday I got to the point that I described in the post. I don’t know how to proceed further because I do not have enough competence.
I am asking people in my faculty. Please let me know if you have any suggestions.
Cheers
Luca

Hi. After spending some work on this I understood that it is not the standard way.
I dropped venv environment and proceeded with conda instead, as described here. That is working smoothly.
Thank you

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