passagemath-groups

raw JSON →
10.8.4 verified Sat May 09 auth: no python

passagemath-groups is a component of the passagemath environment providing group theory and invariant theory functionality, including permutation groups, matrix groups, and algebraic groups. It relies on GAP and libgap. Current version 10.8.4, requiring Python >=3.11 and <3.15. Release cadence follows passagemath releases, typically one or two per year.

pip install passagemath-groups passagemath-sage
error ModuleNotFoundError: No module named 'sage'
cause passagemath-sage or sage package not installed.
fix
pip install passagemath-sage
error ImportError: cannot import name 'PermutationGroup' from 'sage'
cause Trying to import directly from sage instead of submodule.
fix
Use from sage.groups.perm_gps.permgroup import PermutationGroup
error RuntimeError: You must install the GAP package 'gap-core' to use this functionality.
cause GAP not installed.
fix
pip install gap-core
breaking Python 3.15 not yet supported; passagemath 10.x requires Python 3.11-3.14.
fix Use Python 3.11, 3.12, or 3.14 (if available).
gotcha Do not import directly from passagemath.groups; the package is a namespace only. Use sage submodules instead.
fix Use from sage.groups... import ...
deprecated Some named groups moved or renamed in passagemath 10.x compared to SageMath 9.x.
fix Check sage.groups.perm_gps.permgroup_named for current names.

Create a permutation group on 4 points and compute its order.

from sage.all import *
from sage.groups.perm_gps.permgroup import PermutationGroup
G = PermutationGroup([(1,2), (1,3,4)])
print(G.order())