ROOT Version (e.g. 6.12/02): 6.10.04-x86_64-slc6-gcc62-opt
Platform, compiler (e.g. CentOS 7.3, gcc6.2): gcc version 6.2.0 (GCC)
Hi all,
I’m new to use AtlasStyle for plotting pirposes and having some trouble using it. I tried to load it in my pyroot code as follows and I get the following error.
from ROOT import *
import AtlasStyle as ats
ats.SetAtlasStyle()
error:
Traceback (most recent call last):
File “t1.py”, line 2, in
import AtlasStyle as ats
File “/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/ROOT.py”, line 318, in _importhook
return _orig_ihook( name, *args, **kwds )
ImportError: No module named AtlasStyle
Python cannot ind the module called AtlasStyle. The way to fix this is to add to the PYTHONPATH environment variable the path to the aforementioned module.
Thank you for the instructions. I added the path of the module to the PYTHONPATH environment in my .bashrc as,
export PYTHONPATH=“${PYTHONPATH}:~/Downloads” (since AtlasStyle.py is saved at Downloads)
and when I call it in the python terminal, i still get an error saying the following.
Python 2.6.6 (r266:84292, Aug 22 2016, 09:40:33)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import AtlasStyle
Error in TROOT::LoadMacro: macro AtlasStyle.C not found in path .:/usr/share/root/macros: