Ubuntu Linux

For versions Karmic (9.10), Lucid (10.4, LTS) and Maverick (10.10).

If you want a version that is different from the official stable version (e.g., the latest nightly), you need to build it from source like in the Debian Lenny section. The description below is more convenient for the latest stable version.

Add the Launchpad repository of igraph to apt:

sudo add-apt-repository ppa:igraph/ppa

Then update your package database and install the python-igraph package:

First we compile and install the C core of igraph. Change to the igraph-0.5.3 folder and do the following:

cd igraph-0.5.4
./configure
make
make install

The last step needs administrator privileges again.

Because Debian (and Ubuntu) will install the .so files into /usr/local/lib (/usr/lib is reserved for the core system and it should not be used by packages that were compiled and installed by the user), you need to put the following line into ~/.bashrc to tell the system to look for libraries there as well:

export LD_LIBRARY_PATH=/usr/local/lib/

Log out and log in again to ensure that the changes take effect.

Alternatively, you can add /usr/local/lib as a new line to the end of /etc/ld.so.conf if you want to enable these changes system-wide. Make sure you run ldconfig after tweaking /etc/ld.so.conf.

Debian Squeeze

This version includes pre-compiled packages for the C core of igraph, so you don't need to build them from source:

aptitude install libigraph0 libigraph0-dev

After this, you can build the Python binding (see the sections about Debian Lenny above or Other distributions below).

Other distributions

For other distributions you can search for the libigraph (libigraph0) package in the packages, or build it from source, like in Debian Lenny section, but in most distributions you do not need the line export LD_LIBRARY_PATH=/usr/local/lib/ in ~/.bashrc.