Building python support

after a

./configure --enable-python

(where python header are detected successfully:

Checking for Python.h … /usr/include/python2.3
Checking for libpython2.3, libpython2.2, python23, or Python … /usr/lib/python2.3/config

) the command

./configure --pkglist


packages: root-daemon root-gl root-mysql root-pgsql root-cint root-doc libroot-dev root-bin libroot

no python check is included in the second run. if i try to create debian packages everything is builded (mysql, postgresql etc) fine but no python packages are created.

what do i do wrong?


“./configure --pkglist” does not give the list of enabled features. For that, look at the
end of “./configure --enable-python”.

You say that no “python packages” are created. I’m not sure what you expect. Could
you verify the absence of


sorry, i forget to mention the build for debian…

  • there is no debian package made with a name that implies python
  • there is nothing (like in the other deb packages
  • no, a lib is not builded with make debian
  • yes, a lib is builded with make all
  • no, a lib is not installed with make install

if i copy the files by hand i can’t get it running. i copied ROOT.p* and from lib/ to /usr/local/lib/… (and set PYTHONPATH there) and get lots of errors with the examples:

dlopen error: /usr/lib/root/ undefined symbol: _ZNK7TObject7DoErrorEiPKcS1_Pc
Load Error: Failed to load Dynamic link library /usr/lib/root/
Warning in TClass::TClass: no dictionary for class TCanvas is available
Traceback (most recent call last):
File “”, line 13, in ?
from ROOT import TCanvas, TFile, TProfile, TNtuple, TH1F, TH2F
ImportError: cannot import name TProfile

all plain samples work just fine.

best regards & thnx for any help!


Hi Michael,

the building of debian packages is new to me …

First this: the error that you get would appear if you have an older (e.g. from
the last ROOT release) with a current Could you verify the ordening of
paths in your PYTHONPATH?

More later … and install properly for me, and relocating them
works ok as well.


mmmh, that does not work for me. i have no other on the whole system. i start with this version and have no old stuff around. so i do the following:

rm -rf root*
tar xvzf /.../root_v4.01.02.source.tar.gz
mv root root-4.01.02
cd root-4.01.02
./configure --enable-pgsql  --enable-mysql  --enable-opengl  --enable-python  --enable-shared  --enable-soversion --enable-thread
make debian
find . -name 

(no answer :frowning: )

mmh, will try a clean build without debian… one moment :wink:

Hi all,

The reason you see no [b]root-plugin-python'[/b] orpython-root’ package, is that I haven’t made the changes in the packaging scripts to make this package.

I’m assuming of course that libPyRoot is build in the first place.

The situation with the Debian GNU/Linux and Red Hat packaging scripts for ROOT is pretty horrible. Unfortunately I haven’t had the time to do anything about it for quite a while. Hope the siuation will improve within the coming months.

What I’d like to do, is to revamp the scripts altogether. However, that requires some changes to the main trunk of ROOT - some of which are a bit controversial. For example, I believe building libfreetype6 when it already exists on a Debian system is unacceptable, and similar for libafterimage, and so on.

For now, I would copy the Python interface by hand. Or, if you feel up to it, look through the scripts and data files in build/package and see if you can make the necessary changes - I’ll gladely use your patches in the upcoming revision of the packaging scripts.

Someone said they were running SuSE. I think SuSE use RPMs, so you should really make RPMs instead. That’s possible via make redhat.



okay, building from clean dir everything builds cleanly. make install works fine.

it seams the make debian switches off all modules that are not known. i will take a look if i understand those debian build scripts. i don’t like /usr/local installation.

and no: if have no suse (better is ;-).

and yes: i like your aproach making nice debian packages!



This version of ROOT requires “–enable-explicitlink” for python to work. (If you
don’t use it, you’d get the error that you’ve seen.) The current version (HEAD CVS)
no longer requires this.


i left --enable-explicitlink out because i saw it’s set in configure if python is used. the build with the error was done with that option anyway. what was missing is the run of bin/rlibmap -r etc/system.rootmap -l lib/ -d -c pyroot/inc/LinkDef.h when not doing make install. that probably leads to the error above. i copied the files by hand.

the main problem with my setup is the debian build which seems to disable python again. i will try to include python in debian.

thnx for all the help,

okay, finally i managed to build debian packages including python! everything is fine. only the python path does not match. i will investigate that later.

if someone is interested in this please let me know!

thnx for all your help