Get started with the igraph library

Install and start using the igraph library


Make sure you have the following before installing igraph:

  • A Linux, Mac OS X or MS Windows system. 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.
On Ubuntu and Debian Linux, installing the build-essential and the libxml2-dev packages is sufficient.


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

 make check
 make install  

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

  Installation on Mac OS X

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

  Installation on Windows under Cygwin

One way to install igraph on Windows is to use Cygwin. From a Cygwin shell, use the standard installation method, as above.

  Installation on Windows using Microsoft Visual C++

It is also possible to use Microsoft Visual C++ (MSVC). Download the ZIP file made for MSVC, uncompress it, and open the solution file igraph.sln from MSVC. You can build the library the usual way then. For GraphML support you'll need to install the libxml2 library by hand, see the Windows port of libxml2.


  • The source code comes with some examples (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.7.1

  Development version

Clone (or fork) the master branch from the 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. See our guide on contributions to the igraph C library at GitHub.