Get started with python-igraph

Install and start using python-igraph


On Linux (and other Unix-like systems), you will need a C and a C++ compiler, the tool make and the development header files for your version of Python. On Debian and Ubuntu Linux the build-essential and python-dev packages install these. On Mac OS X, you can get a working C and C++ compiler as well as make by installing XCode or the XCode Command Line Tools.

See also the platform-specific installation instructions below.


igraph is on the Python Package Index so it can be installed using pip or easy_install:

$ pip install python-igraph

If the C core of igraph has already been installed to a location that can be detected using pkg-config, pip will compile and link the extension to the C core that you have installed. If the C core is not installed or is installed in a location that cannot be detected using pkg-config, pip will attempt to download a matching version of the C core and compile it together with the Python interface. Note that this will not work on Windows; you are advised to download and run one of the Python wheels that Christoph Gohlke provides on his website.

  Installation on Mac OS X

Instead of letting pip compile the C core for you, you can install Homebrew and the homebrew/science/igraph formula. This will ensure that the C core is found by pip so running pip install python-igraph will compile the Python interface only and link it to the C core.

  Installation on Windows

The preferred way to install the Python interface on Windows is to download one of the unofficial installers built by Christoph Gohlke. (Thanks Christoph!). We do not provide "official" installers for Windows as we don't use Windows ourselves and we would not be able to test them before release. Note that the automatic compilation of the C core when running pip install python-igraph will not work on Windows!


  • A short tutorial is provided on this page.
  • The documentation of the Graph and GraphBase classes provide a good overview of most of the functionality in the Python interface.

 Python manual

Documentation for the Python interface is also included in the Python docstrings, so you can use pydoc or the built-in Python help facility as well.

  Current release – version 0.7.0

  Development version

Clone (or fork) the develop branch from the python-igraph git reposity on github.

 Mailing list

Post a question on the igraph-help mailing list. To avoid spam on the list, you need to sign up first. You can also search the mailing list.

 Stack Overflow

Post specific igraph questions on Stack Overflow. Make sure that you include the igraph tag and that you include a reproducible example, complete with code and data.

Your contribution is more than welcome!

  Report bugs

Report bugs or suggest new features or algorithms in the github issue tracker.

  Contribute code

Send a pull request on github. Please note that igraph can contain only code that is compatible with its GPL license.