I want to use pyROOT, but the installed ROOT modules are not in the right place. I’ve done this:
./configure --enable-soversion --enable-rpath --prefix=/usr/local --enable-python --with-python-incdir=/usr/include/python2.5 --with-python-libdir=/usr/lib64 --disable-xrootd
/usr/include/python2.5 is the directory where there is Python.h
/usr/lib64 is the directory where there is libpython2.5.so
[size=75]note that I have libpython2.5.so and not libpython.2.5.so as you say in your guide (libpython.x.y.[so][.dll], where ‘x’ and ‘y’ are the major and minor version number of Python, respectively root.cern.ch/root/HowtoPyROOT.html)
The problem is that ROOT.py is not in /usr/include or in /usr/lib64 (or subfolders) but it is in /usr/local/lib/root and python can’t find it.
from ROOT import * Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named ROOT
I prefer to not use PYTHONPATH variable.
>>> import sys >>> sys.path ['', '/usr/lib/python25.zip', '/usr/lib64/python2.5', '/usr/lib64/python2.5/plat-linux2', '/usr/lib64/python2.5/lib-tk', '/usr/lib64/python2.5/lib-dynload', '/usr/lib64/python2.5/site-packages', '/usr/lib64/python2.5/site-packages/Numeric', '/usr/lib64/python2.5/site-packages/PIL', '/usr/lib64/python2.5/site-packages/gtk-2.0']