passagemath-bliss
raw JSON → 10.8.4 verified Fri May 01 auth: no python
A Python binding for the bliss graph isomorphism library, part of the passagemath ecosystem. It provides efficient automorphism group computation and (sub)graph isomorphism. Version 10.8.4 requires Python <3.15,>=3.11.
pip install passagemath-bliss Common errors
error ImportError: cannot import name 'bliss' from 'sage.graphs' ↓
cause Using wrong import path or missing passagemath packages.
fix
Install passagemath-sage and use
from sage.graphs.bliss import canonical_form. error ValueError: graph must be simple (no loops or multiple edges) ↓
cause Bliss only supports simple graphs.
fix
Use
G.to_simple() before passing to bliss functions. Warnings
deprecated The standalone `bliss` module (e.g., `from bliss import *`) is deprecated. Use `sage.graphs.bliss` instead. ↓
fix Change imports to `from sage.graphs.bliss import ...`.
gotcha Not all bliss functions accept multigraphs; edges with multiple parallel edges may cause silent failures. ↓
fix Convert multigraphs to simple graphs before calling bliss functions.
Imports
- bliss wrong
import blisscorrectfrom sage.graphs.bliss import * - canonical_form
from sage.graphs.bliss import canonical_form
Quickstart
from sage.graphs.bliss import canonical_form, automorphism_group
g = graphs.PetersenGraph()
canon, relabel = canonical_form(g, return_relabeling=True)
print(canon.edges()[:2])
aut = automorphism_group(g)
print(aut.order())