Registry / data / networkit

networkit

JSON →
library11.2.1pypypi✓ verified 84d ago

NetworKit is an open-source toolbox for high-performance network analysis. It provides efficient implementations of graph algorithms for large networks, with a focus on scalability and performance. Current version 11.2.1, released irregularly.

pip install networkit
INSTALL
IMPORT
SIG · NETWORKIT
N
networkit
datapythonv11.2.1
Install
7.9s avg
Import
1478ms
Disk
282MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v11.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 7.8s
py 3.11
✕ build_error
✓ 8s
py 3.12
✕ build_error
✓ 7.8s
py 3.13
✕ build_error
✓ 8.1s
py 3.9
✕ build_error
✕ build_error
282MB installed
● package 282MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

networkit
import networkit as nk
import NetworKit
The module name is all lowercase 'networkit'.
graph
from networkit import graph
import networkit.graph
graph is a submodule, not a top-level attribute.

Basic usage: create a graph, add edges, run a BFS.

import networkit as nk # Create a graph G = nk.Graph(5) G.addEdge(0, 1) G.addEdge(1, 2) G.addEdge(2, 3) G.addEdge(3, 4) # Run BFS bfs = nk.distance.BFS(G, 0) bfs.run() print(bfs.distances())
networkit --version
Debug
Known issues
breakingIn version 10.0, the module structure was reorganized. Submodules like 'graph' and 'distance' must be imported explicitly (e.g., 'from networkit import graph') instead of 'import networkit.graph'.
fix
Use 'from networkit import <submodule>' instead of 'import networkit.<submodule>'.
affects: >=10.0
breakingStarting with version 9.0, Python 3.6 and 3.7 are no longer supported. Requires Python >=3.8 (now >=3.10 as of 11.0).
fix
Ensure Python version >=3.10.
affects: >=9.0
deprecatedThe old 'NetworKit' C++ naming is deprecated in Python. Do not use 'from NetworKit import Graph'.
fix
Use 'import networkit as nk' and 'nk.Graph'.
affects: all
gotchaGraph edges are directed by default? Actually, Graph is undirected by default. Use Graph(0, directed=True) for directed graphs.
fix
Specify directed=True when creating a directed graph.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'networkit'
NetworKit not installed or installed in wrong environment.
fix
Run 'pip install networkit'. Ensure you are using the correct Python environment.
AttributeError: module 'networkit' has no attribute 'graph'
Trying to access submodule directly without importing it.
fix
Use 'from networkit import graph' or 'import networkit.graph' (though the latter may still fail in some versions). Preferred: 'from networkit import graph'.
ImportError: cannot import name 'BFS' from 'networkit'
BFS is not a top-level attribute; it's in the 'distance' submodule.
fix
Use 'from networkit.distance import BFS'.
Upgrade
Version history
11.2.1latest on PyPI · released Jan 9, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
networkit — pip install networkit · libregistry