passagemath-libbraiding
raw JSON → 10.8.4 verified Fri May 01 auth: no python
passagemath-libbraiding provides Python bindings to libbraiding for braid group computations (word reductions, conjugacy tests, etc.). It is part of the passagemath ecosystem. Current version: 10.8.4. Release cadence: follows passagemath releases, typically a few per year.
pip install passagemath-libbraiding Common errors
error ImportError: cannot import name 'BraidGroup' from 'sage.groups.braid' ↓
cause Old import path used before passagemath rename.
fix
Use 'from passagemath.braid import BraidGroup' instead.
error ModuleNotFoundError: No module named 'passagemath.braid' ↓
cause passagemath-libbraiding is not installed or the Python environment is incorrect.
fix
Run 'pip install passagemath-libbraiding' in the correct environment.
error libbraiding.so: cannot open shared object file: No such file or directory ↓
cause The underlying libbraiding C library is missing.
fix
Install libbraiding system-wide (e.g., 'apt install libbraiding-dev' on Debian/Ubuntu) or use conda.
Warnings
breaking In passagemath 10.x, all imports moved from sage.* to passagemath.*. Old code using 'from sage.groups.braid import BraidGroup' will break. ↓
fix Replace 'sage.groups.braid' with 'passagemath.braid'.
deprecated passagemath-libbraiding 10.8.x is the last release supporting Python 3.11; Python 3.12+ requires version 11+. ↓
fix Upgrade to passagemath-libbraiding >=11.0 when available for Python 3.12+ support.
gotcha The libbraiding C library must be installed separately; passagemath-libbraiding only provides the Python bindings. ↓
fix Install libbraiding via system package manager (e.g., 'apt install libbraiding-dev') or use conda (includes it).
Install
conda install -c conda-forge passagemath-libbraiding Imports
- BraidGroup wrong
from sage.groups.braid import BraidGroupcorrectfrom passagemath.braid import BraidGroup - Braid
from passagemath.braid import Braid
Quickstart
from passagemath.braid import BraidGroup
B = BraidGroup(4)
braid = B([1, -2, 3])
print(braid)
print(braid.is_conjugate(B([2, -1, 3])))