Problem installing pyROOT

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)
[/size]

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']

What is the reason for that preference? Without setting PYTHONPATH, the ROOT module will not be found. You could, of course, add or symlink it (and libPyROOT.so) manually to the python system libraries if you have write access to it (which a normal install script would have needed as well).

Best regards,
Wim

What is the reason for that preference? Without setting PYTHONPATH, the ROOT module will not be found. You could, of course, add or symlink it (and libPyROOT.so) manually to the python system libraries if you have write access to it (which a normal install script would have needed as well).

Best regards,
Wim[/quote]
I don’t want to use PYTHONPATH, ROOTPATH… because they’re unuserfull; if I need to define a new variable every time I install a new library I can became crazy. Without the PYTHONPATH I can use ROOT module if it is installed in the right place. In my case the right place is /usr/lib64 but even if I’ve specified

--with-python-libdir=/usr/lib64

“make install” copy the module in the right place.

The “–with-python-libdir” flag is to locate the libpython location, not to set an installation path.

Copying/symlinking by hand is the only available option right now, I’m afraid.

Cheers,
Wim

pyroot problems should be reported to the pyroot thread

Rene