PyROOT using root-system.deb

I was having some prooblems installing from source on Ubuntu Feisty, so I used the .deb install from BNL. I also installed root-plugin-python. Python could not load fresh from the install. I triedexport ROOTSYS=/usr/include/root export PATH=$PATH:$ROOTSYS/bin:$PYTHONDIR/lib export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD_LIBRARY_PATH export PYTHONPATH=$ROOTSYS/lib:PYTHONPATH
But python still said ROOT did not exist. I found in /lib and tried to run python from there. I recievd the following error:[code]>>> import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “”, line 83, in
import libPyROOT as _root
ImportError: ./ undefined symbol: ZNK7TObject6SaveAsEPKcS1



I’m not familiar with the .deb install, but it seems like isn’t linked with Can you verify with ldd


Thank you for the help here is the output.
Should one of my system varibale be pointing here(/usr/lib/root/5.15/)?

ldd /usr/lib/root/5.15/ =>  (0xffffe000) => /usr/lib/root/ (0xb77a7000) => /usr/lib/root/ (0xb720d000) => /usr/lib/root/ (0xb70d8000) => /usr/lib/root/ (0xb6fe0000) => /usr/lib/root/ (0xb6d3e000) => /usr/lib/root/ (0xb6b08000) => /usr/lib/root/ (0xb69f7000) => /usr/lib/root/ (0xb691e000) => /usr/lib/root/ (0xb6751000) => /usr/lib/root/ (0xb650c000) => /usr/lib/root/ (0xb6463000) => /lib/tls/i686/cmov/ (0xb645f000) => /usr/lib/ (0xb6327000) => /usr/lib/ (0xb623d000) => /lib/tls/i686/cmov/ (0xb6215000) => /lib/ (0xb6209000) => /lib/tls/i686/cmov/ (0xb61f2000) => /lib/tls/i686/cmov/ (0xb60b1000) => /usr/lib/ (0xb609d000) => /usr/lib/ (0xb607d000) => /lib/tls/i686/cmov/ (0xb604e000) => /usr/lib/ (0xb5fe3000)
        /lib/ (0x80000000) => /lib/tls/i686/cmov/ (0xb5fdf000)


the output of ldd shows that you have some older installed version of ROOT on your system. Since it is installed in a system directory (/usr/lib), it takes precedence.

Note that in your earlier environment settings, you have $PATH before $ROOTSYS/bin in the new PATH, so you’ll likely get the old root.exe, but that shouldn’t matter for python.

Now, I’m not quite sure what ROOTSYS should be in the setup that you have here (typically, one finds include, lib, bin, and etc under $ROOTSYS, which doesn’t appear to be the case in your system), but this is roughly what it should look like:export LD_LIBRARY_PATH=/usr/lib/root/5.15:$LD_LIBRARY_PATH export PYTHONPATH=/usr/lib/root/5.15:$PYTHONPATHassuming that is installed with the other libs. No further changes to variables have to be made for python itself as you seem to have the system one (that is at least what it looked like in another thread). You may need to modify PATH to point to current (5.15) root.exe.


No, is in /lib/.

Thank you so much. I had tried those system variable earlier with no luck–the proper ROOT version ran, but import ROOT failed in python. However when you said [quote]assuming that is installed with the other libs[/quote]
I realised that that was the problem was installed in /lib/ not in /usr/lib/root/5.15/ like everything else. So I just copied from /lib/ into /usr/lib/root/5.15/

sudo cp /lib/ /usr/lib/root/5.15/

with your proposed enviromental settings. It loads just fine now; I will test it out today.

I just recieved a reply from Christian Holm Christensen:

[quote]On Tue, 2007-07-03 at 15:49 +0200, David Layton wrote:

What needs to be done to use PyROOT if you install from *.deb?

   sudo apt-get install root-system-doc python2.4-pyroot
   cp /usr/share/doc/root/tutorials/python/ .

That’s it. No need for environment variable, and ladida.[/quote]

The packages are broken for my system, but it appears that python2.4-pyroot is the correct package. Hope this helps others who make the same mistake.

The packages are broken for my system, but it appears that python2.4-pyroot is the correct package. Hope this helps others who make the same mistake.[/quote]

The problem is, that Ubuntu’s dh_python script outputs the wrong dependencies when building the packages. It is well known, and we’re awaiting an upstream fix for this.

For know, you can try to force the installation of libroot-python-dev.

Note, that the packages work perfectly on Debian GNU/Linux sid (unstable).

Some comments on the thread so far

To Wim: The lastest packages available for Debian and Ubuntu is 5.15/07, so the output of Davids ldd is entirely correct. That is, those are not old libraries.

To Wim and David: Note, that when you install the Debian/Ubuntu/RPM packages, you should not set ROOTSYS, or include any special directories in LD_LIBRARY_PATH, and PATH. When installing packages, the files are put into the system directories (respecting the FHS):
/etc/root Configuration files
/usr/bin Programs, etc.
/usr/include/root Headers
/usr/lib/root libraries
/usr/lib/root/<version> Plug-ins
[i]/usr/share/root[/code] Data files
/usr/share/doc/root Documentation
/usr/share Data files for other programs (Emacs, Python, Autoconf, etc.)

To David: The is in /usr/lib/root/5.15, and there’s a symbolic link to this from /usr/share/python-support/root/. If you have in /lib you either copied it there yourself, it is left over from an old install, or some other thing.



I know my is fom an old install. I am just glad it works. I tried to force the package installation:[code]
sudo apt-get -f -m --force-yes install libroot-python-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libroot-python-dev: Depends: python (< 2.5) but 2.5.1-0ubuntu3 is to be installed
E: Broken packages