Get started with the igraph library

Install and start using the igraph library

  Installation on Windows

Compilation on Windows involves a number of more detailed steps, please see this explanation for more details.

 Installation on Linux

Make sure you have the following before installing igraph:

  • A Linux system, such as Ubuntu or Debian. Other Unix and similar systems probably work as well, e.g. Oracle Solaris, BSD systems, etc.
  • C and C++ compilers, gcc, clang or others.
  • The GNU make tool.
  • Optionally the libxml2 library for reading GraphML files.
  • Optionally the GMP library to support arbitrary precision arithmetic.
On Ubuntu and Debian Linux, installing the build-essential and optionally the libxml2-dev and libgmp-dev packages is sufficient.

The standard installation method uses the autoconf/automake toolset. After downloading and uncompressing the release source code run the following commands from the top-level directory of the code.

make check
make install

When compiling code directly from the GitHub repository, the ./configure script should first be generated using ./, and the bison and flex tools must be installed.

The make check step is optional, but it is useful to spot problems early on.

  Installation on macOS

You can use the regular Linux way (as above), or if you have Homebrew or MacPorts, then simply install the igraph package.


  • The source code comes with some examples (some of which are also used for testing). You can find them in the examples/simple directory.
  • Most of the examples are also included in the Reference Manual.

  C Reference Manual

The original XML DocBook format of the C Reference Manual can be obtained by downloading the latest igraph development version from GitHub.

 Current release – version 0.8.2

  Development version

Clone (or fork) the master branch from the igraph git repository on GitHub.

 igraph support forum

Post your question on the igraph support forum . Make sure that you include a minimal reproducible example, complete with code and data.

 Stack Overflow

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

  Report bugs

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

Your contribution is more than welcome!

  Contribute code

Send a pull request on GitHub. Please note that igraph can contain only code that is compatible with its GPL license. See our guide on contributions to the igraph C library at GitHub.