root.sh
script he creates in my .bashrc
on my Mac:
export CMSSW_BASE=/Users/jeff/Work/cmsShow34
export ROOTSYS=$CMSSW_BASE/external/root
export LD_LIBRARY_PATH=${CMSSW_BASE}:${CMSSW_BASE}/external/lib:${ROOTSYS}/lib
export DYLD_LIBRARY_PATH=${CMSSW_BASE}:${CMSSW_BASE}/external/lib:${ROOTSYS}/lib
export PATH=${ROOTSYS}/bin:$PATH
Next, I wanted to get PyROOT (the Python interface to ROOT) working. Looking through the documentation on PyROOT, I was able to get the basic information needed, but it took a little fiddling. I added the necessary lines to my
.bashrc
,
export LD_LIBRARY_PATH=$(addto $LD_LIBRARY_PATH $ROOTSYS/lib)
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH
but there was a mismatch of Python versions that gave me an error message. The solution was to force the use of Python 2.5.x by calling
python2.5
rather than python
, which can even be specified in the "shebang" of a script: #!/usr/bin/env python2.5
.