Thisroot.sh in docker container

OK, I think I’ve figured it out. If I run the shell using sudo, I can import ROOT in python because it has the appropriate ROOT stuff in the python site-packages/. It wasn’t working when I ran the shell without sudo because it wasn’t setting $PYTHONPATH (discussed here). I can just set $PYTHONPATH directly and don’t need to source thisroot.sh (which I’m fairly certain does not exit in my container).

It would be nice to have a thisroot.sh to source to easily make use of ROOT if I set up different python environments, but I guess I can always just add a link to /usr/lib64/python__/site-packages/ROOT in the site-packages folder for my other environment.

TL;DR: There was really never a problem. I thought there was because I was searching for thisroot.sh (which I couldn’t find because it isn’t there), but what I fundamentally needed was ROOT/__init__.py which was always there in site-packages/ ; I was just not looking for it!

1 Like