_Please read tips for efficient and successful posting and [posting code](Is it possible to nest trees?
_Please read tips for efficient and successful posting and [posting code](Is it possible to nest trees?
See if you have “pyroot” among: root-config --features
In principle you should not set ROOT related environment variables manually. You should simply:
source /full/path/to/your/root/bin/thisroot.sh
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.
Thanks anyway.
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:
PYTHONPATH='.' your_python_script