I tried to load pyroot. But I got the following error:
>>> from ROOT import *
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/afs/cern.ch/sw/lcg/app/releases/ROOT/5.20.00/slc4_amd64_gcc34/root/lib/ROOT.py", line 85, in ?
import libPyROOT as _root
ImportError: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
Did I make an error, or is there something wrong with the root installation on lxplus?
Looks like the default python doesn’t know about ROOT:
[code]lxplus301 > which python
/afs/cern.ch/project/gd/LCG-share/3.1.25-0/external/usr/bin/python
lxplus301 > python
Python 2.3.4 (#1, Jul 30 2008, 01:34:10)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import ROOT
Traceback (most recent call last):
File “”, line 1, in ?
ImportError: No module named ROOT[/code]
What should I do?
We’re getting closer, but I’m still getting an error when trying to import ROOT:
[code]lxplus258 > which python
/afs/cern.ch/project/gd/LCG-share/3.1.25-0/external/usr/bin/python
lxplus258 > python
impPython 2.3.4 (#1, Jul 30 2008, 01:34:10)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import ROOT
Traceback (most recent call last):
File “”, line 1, in ?
File “/afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc34-opt/root/lib/ROOT.py”, line 86, in ?
import libPyROOT as _root
ImportError: /afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc34-opt/root/lib/libPyROOT.so: wrong ELF class: ELFCLASS64[/code]
[code]lxplus301 > /usr/bin/python
Python 2.4.3 (#1, Sep 4 2009, 16:48:22)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import ROOT
Traceback (most recent call last):
File “”, line 1, in ?
File “/afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc43-opt/root/lib/ROOT.py”, line 86, in ?
import libPyROOT as _root
ImportError: libpython2.5.so: cannot open shared object file: No such file or directory[/code]
the afs installations of ROOT utilize p2.5 b/c that’s what the experiments want. If libpyroot2.5.so is missing, then LD_LIBRARY_PATH is missing a directory pointing to it.
You’ll find the various p2.5’s on afs here:
/afs/cern.ch/sw/lcg/external/Python/2.5.4p2/
Select your platform from under there and add the ‘bin’ directory to PATH and the ‘lib’ directory to LD_LIBRARY_PATH.