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
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 install python-igraph
If the C core of igraph has already been installed to a
location that can be detected using
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
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 MSI installers that
we provide on the Python
Instead of letting
pip compile the C core for you,
you can install Homebrew and
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.
The preferred way to install the Python interface on Windows is to
download one of the MSI installers from the
Python Package Index.
If you do not find an installer that is suitable for your specific
version of Python, you can also try one of the unofficial installers built by
(Thanks Christoph!). Note that the automatic compilation of the C core
pip install python-igraph will not
work on Windows!
Documentation for the Python interface is also included in
the Python docstrings, so you can use
the built-in Python help facility as well.
Clone (or fork) the
develop branch from the
reposity on github.
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 or suggest new features or algorithms in the github issue tracker.
Send a pull request on github. Please note that igraph can contain only code that is compatible with its GPL license.