PyROOT installation on Ubuntu 10.04

In howto on Jul 13, 2012 by theoryl Tagged: , , , , , , , ,

Last time I installed ROOT, I did not have PyROOT enabled. So I have to recompile. The following assumes Python 2.6 has been installed.

Install ROOT v5.27/06b on Ubuntu 10.04:

# Download ROOT via svn checkout. For simplicity, download to the home area
svn co ~/root
cd ~/root
svn switch

# Get all the dependencies for Ubuntu
sudo apt-get install build-essential libx11-dev libxpm-dev libxft-dev libxext-dev

# Configure. Enable PyROOT along with many useful features
# (to change the installation directory, add `--prefix=/path/to/installation/directory/`)
./configure linux --enable-python --with-python-incdir=/usr/include/python2.6/ --with-python-libdir=/usr/lib/ --enable-mathcore --enable-mathmore --enable-roofit --enable-minuit2 --enable-gdml --enable-table

# Make
# (to use n number of cores, do `make -j n`)

# Install
# (to gain superuser privilege, do `sudo make install`)
make install

To run ROOT, the environment variables need to be set. For bash shell:

export ROOTSYS=$HOME/root
export PATH=$ROOTSYS/bin:$PATH

For c-shell:

setenv ROOTSYS $HOME/root
setenv PATH $ROOTSYS/bin:$PATH

Equivalently, they can be set by doing

source $HOME/root/bin/
#< for c-shell, do `source $HOME/root/bin/thisroot.csh`

To avoid setting the above variables every time, you can put the commands into ~/.bashrc (or ~/.cshrc).

Now try running ROOT:


If the ROOT splash screen shows up, quit and try running PyROOT:

python ~/root/tutorials/pyroot/

Please report any inaccuracy.


2 Responses to “PyROOT installation on Ubuntu 10.04”

  1. Tried all this on a recent Ubuntu release following modifying the ./configure step however it does not work.

    python ~/ROOT/root/tutorials/pyroot/
    Traceback (most recent call last):
    File “/home/sdt/ROOT/root/tutorials/pyroot/”, line 2, in
    import ROOT
    ImportError: No module named ROOT

  2. Hi, it is also not working for me.

    $ svn co ~/root
    Redirecting to URL ‘’:
    svn: E160013: Unable to connect to a repository at URL ‘’
    svn: E160013: ‘/svn/root/tags/v5-27-06d’ path not found

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: