See if you have “pyroot” among:
In principle you should not set ROOT related environment variables manually. You should simply:
yes. i have pyroot. I actually figured it out just now . I had already done source command as you mentioned which didnt work. But when I set the correct path manually I got it.
export PYTHONPATH=$(root-config --libdir)
Python does not add the current directory to sys.path, but rather the directory that the script is in. Add your project directory to either sys.path or $PYTHONPATH.
Also, set the PYTHONPATH to ‘.’ to solve this issue.
For a one-liner you could as easily do: