igraph
High performance graph data structures and algorithms
What it is and what it does
igraph is a Python binding to a high-performance C graph library designed for network research and complex network analysis. It provides data structures and algorithms for constructing graphs, computing network metrics, detecting communities, and analyzing structural properties. The package is aimed at researchers and developers working with graph-based problems in biology, physics, social networks, and discrete mathematics.
The library's core functionality is written in C for speed, but is exposed through a Python API. Graph visualization is optional and requires separate installation of Cairo bindings (cairocffi or pycairo); the description notes that cairocffi is recommended for Jupyter notebook compatibility. The package supports Python 3.9 and later, with precompiled wheels for most common platforms, reducing installation complexity compared to pure source builds.
Use it for:
- Analyze social networks, citation networks, or biological networks to compute centrality measures and detect community structure
- Perform graph algorithms like shortest paths, spanning trees, or clique detection on large datasets
- Generate publication-quality network visualizations using Cairo integration for research papers or reports
- Study discrete mathematical properties of graphs in academic research or algorithm development
- Build network-based applications requiring fast graph operations on millions of nodes or edges
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
igraph provides a Python interface to a high-performance C graph library for constructing, analyzing, and visualizing networks and complex graphs.
Yes, if you need to work with graphs or networks. igraph is actively maintained, widely used (top 5000 on PyPI), has no known vulnerabilities, and offers substantial performance advantages over pure-Python graph libraries due to its C backend. The copyleft GPL license is a consideration if you plan to redistribute; otherwise it poses no barrier to use. Medium install friction is acceptable given the availability of prebuilt wheels.
Install
igraph on PyPI
pip
pip install igraphuv
uv add igraphpoetry
poetry add igraphInstalling igraph
Before you install
Medium install friction due to compiled C bindings; however, prebuilt wheels are available for common platforms (macOS, Linux, Windows) and Python versions 3.9–3.13. The package is actively maintained with recent commits and a stable release cadence.
License in practice
Licensed under GNU General Public License (GPL), a copyleft license. Any software that links to or redistributes igraph must comply with GPL terms, including making source code available under compatible terms.
Quickstart
pip install igraph
import igraph as ig
# Create a simple graph
g = ig.Graph.Famous("petersen")
print(g.summary())
Requires Python 3.9 or later. Graph plotting requires separate installation of cairocffi or pycairo; cairocffi is recommended for Jupyter compatibility.
Verify before relying
- Whether graph plotting requires explicit installation of cairocffi or pycairo, or if igraph functions without them
- Performance characteristics and scalability limits for large graphs
Package facts
| License | GNU General Public License (GPL) (copyleft) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — texttable |
| Maintenance | actively maintained — 295 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,425,214/month — #2,626 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: igraph-1.0.0-cp39-abi3-macosx_10_15_x86_64.whl; igraph-1.0.0-cp39-abi3-macosx_11_0_arm64.whl; igraph-1.0.0-cp39-abi3-manylinux_2_28_aarch64.whl; igraph-1.0.0-cp39-abi3-manylinux_2_28_x86_64.whl; igraph-1.0.0-cp39-abi3-musllinux_1_2_aarch64.whl; igraph-1.0.0-cp39-abi3-musllinux_1_2_x86_64.whl; igraph-1.0.0-cp39-abi3-win32.whl; igraph-1.0.0-cp39-abi3-win_amd64.whl; igraph-1.0.0-cp39-abi3-win_arm64.whl; igraph-1.0.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl; igraph-1.0.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl; igraph-1.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl; igraph-1.0.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl; igraph-1.0.0-pp311-pypy311_pp73-win_amd64.whl
Keywords: graph, network, mathematics, math, graph theory, discrete mathematics
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
python-igraphPython interface to the igraph graph library…
copyleft · top 15,000 on PyPI
leidenalgImplements the Leiden community detection…
copyleft · top 15,000 on PyPI
ipysigmaA Jupyter widget that renders interactive…
permissive · top 15,000 on PyPI
pygraphvizPyGraphviz provides a Python interface to…
permissive · top 5,000 on PyPI
matplotlibmatplotlib creates static, animated, and…
permissive · top 1,000 on PyPI
planarityTests whether a graph is planar, computes…
permissive · top 15,000 on PyPI
scikit-networkscikit-network provides graph algorithms and…
permissive · top 5,000 on PyPI