I would like to import pyROOT inside my python scripts I use with my apache server user.
I can import ROOT in my python scripts without problems when I am logged with my user.
I try to add the following in my script to load the environment from root 5.34/32, which seems to be working fine.
I launch the following python script from a PHP file
command = [‘bash’, ‘-c’, ‘source /programas/root34.32/root/bin/thisroot.sh && env’]
proc = subprocess.Popen(command, stdout = subprocess.PIPE)
for line in proc.stdout:
(key, _, value) = line.partition("=")
os.environ[key] = value
but when I add
the script stops there. Do you have any idea of what I might be missing? All env variables seem to have been set properly by thisroot.sh script.