Registry / data / louvain

louvain

JSON →
library0.8.2pypypiunverified

louvain is a Python implementation of the Louvain algorithm for community detection in large networks, based on the igraph library. Current version is 0.8.2, with a relatively stable release cadence (last update 2024).

pip install louvain
INSTALL
IMPORT
SIG · LOUVAIN
L
louvain
datapythonv0.8.2
Install
2.4s avg
Import
560ms
Disk
37MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.2 · 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
✓ —
✓ 2.1s
py 3.11
✓ —
✓ 2.8s
py 3.12
✕ build_error
✕ build_error
py 3.13
✕ build_error
✕ build_error
py 3.9
✓ —
✓ 2.3s
37MB installed
● package 37MB
Code
Verified usage

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

louvain
import louvain

Basic community detection using the Louvain algorithm on a random graph.

import igraph as ig import louvain G = ig.Graph.Erdos_Renyi(n=100, p=0.1, directed=False) partition = louvain.find_partition(G, louvain.ModularityVertexPartition) print(partition.membership)
Debug
Known issues
deprecatedThe standalone 'louvain' package is deprecated; consider using 'leidenalg' for newer algorithms
fix
Use pip install leidenalg and import leidenalg (also by same author, more efficient)
affects: >=0.8.0
gotchaMust install python-igraph separately
fix
Run: pip install python-igraph
affects: all
gotchaThe 'louvain' module does not install igraph automatically; missing igraph causes ImportError
fix
Ensure igraph is installed and imported before louvain
affects: all
Upgrade
Version history
0.8.2latest on PyPI · released Mar 18, 2024
Audit
Dependencies
python-igraphrequiredlouvain depends on igraph for graph representation and core algorithms
Agent activity
2 hits · last 30 days
node
2
Resources
louvain — pip install louvain · libregistry