python + igraph "plotting not available"

Raphael picture Raphael · Aug 22, 2012 · Viewed 18.3k times · Source

I installed python-igraph 0.5.4 and igraph 0.5.4 (also tested 0.6) from source on a RHEL machine. All is fine except when I try to plot I get.

"TypeError: plotting not available"

There were no errors or warnings in the configure or install stages.

What do I need to install on linux to get plotting to work? I don't have root so will need to install it from source.

Answer

Tamás picture Tamás · Aug 22, 2012

igraph uses the Cairo library for plotting, so you will need Cairo and its Python interface. Chances are that Cairo is already installed on your machine (look for files named libcairo* in /usr/lib and /usr/lib64), so you just need the Python interface of Cairo.

There is one catch, though. In order to compile the Python interface of Cairo, you will need Cairo's header files, which might or might not be present on your system. If they are not installed, you can download Cairo's source and get the include files from there.