Posts Tagged ‘cern’


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.


ROOT installation on Ubuntu 10.04

In howto on Apr 16, 2010 by theoryl Tagged: , , , , , , ,

I upgraded Ubuntu from 8.04 to 10.04, so I needed to build ROOT, which is the bread and butter of some scientists (but perhaps not a lot of love). ROOT is now available via subversion (svn), making it much easier to update/patch.

Install ROOT v5.26/00b on Ubuntu 10.04:

  1. Download ROOT via svn checkout. For simplicity, I assume it is downloaded to the home area:
    $ svn co ~/root
    $ cd ~/root
  2. Get all the dependencies:
    $ sudo apt-get install build-essential libx11-dev libxpm-dev libxft-dev libxext-dev
  3. Configure. Here I enable most of the features to save myself worry about missing libraries in the future:
    $ ./configure linux --enable-mathcore --enable-mathmore --enable-roofit --enable-minuit2 --enable-gdml --enable-table
    (to change the installation directory, add --prefix=/path/to/installation/directory/)
  4. Make
    $ make
    (use make -j n if you have a n-core machine)
  5. Install
    $ make install
    (might need sudo depending on which directory ROOT is installed into)

Read More »


ROOT installations on Ubuntu 8.04 and Leopard

In howto on May 31, 2008 by theoryl Tagged: , , , , , , ,

ROOT is an Object-Oriented Data Analysis Framework created by CERN to perform all kinds of scientific data manipulations. I’ll skip the intro and proceed to the ROOT installation on Ubuntu Hardy Heron (as well as Feisty Fawn) and on Mac OS X Leopard 10.5.2. You can find plenty of information at the ROOT website.

ROOT 5.18 setup on Ubuntu Hardy Heron:

  1. Get the source tarball (root_v5.18.00.source.tar.gz). I put it in the home directory (~) and cd to it.
  2. tar -xzf root_v5.18.00.source.tar.gz
  3. cd root # root is the directory you extracted from the tarball
  4. sudo apt-get install libX11-dev libXpm-dev libxft-dev build-essential libxext-dev # needed to build ROOT
  5. ./configure --prefix=/usr/local/root --libdir=/usr/local/root/lib --enable-minuit2 --enable-roofit
  6. make # if dual core processor, use make -j2
  7. make install
  8. The installation is done! Each time you want to run ROOT, you have to point to the right paths. This can be done by doing source /usr/local/root/bin/ (in a bash shell). You can also put the command in .bashrc to have it executed each time you open a terminal.

Read More »