Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

passagemath is open source mathematical software in Python, released under the GNU General Public Licence GPLv2+.

It is a fork of SageMath, which has been developed 2005-2026 under the motto “Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, and MATLAB”.

The passagemath fork uses the motto “Creating a Free Passage Between the Scientific Python Ecosystem and Mathematical Software Communities.” It was created in October 2024 with the following goals:

Moreover, the passagemath project:

  • provides a stable, frequently updated version of the Sage distribution,

  • integrates additional mathematical software, notably Macaulay2, a full set of GAP packages, and the Combinatorial Matrix Recognition library,

  • curates a library of Sage user packages.

Full documentation is available online.

passagemath attempts to support and provides binary wheels suitable for all major Linux distributions and recent versions of macOS.

Binary wheels for native Windows (x86_64, ARM) are are available for a subset of the passagemath distributions. Use of the full functionality of passagemath on Windows currently requires the use of Windows Subsystem for Linux (WSL) or virtualization.

The supported Python versions in the passagemath-10.8.x series are 3.11.x-3.14.x; the passagemath-10.6.x series (EOL 2026-10) still supports Python 3.10.x.

About this pip-installable distribution package

This pip-installable distribution passagemath-polyhedra is a distribution of a part of the Sage Library. It provides a small subset of the modules of the Sage library (“sagelib”, passagemath-standard), sufficient for computations with convex polyhedra in arbitrary dimension (in exact rational arithmetic), and linear and mixed integer linear optimization (in floating point arithmetic).

What is included

Examples

A quick way to try it out interactively:

$ pipx run --spec "passagemath-polyhedra[test]" ipython

In [1]: from passagemath_polyhedra import *

In [2]: P = Polyhedron(ieqs=[[0, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1], [0, 0, 1, -1, -1, 1, 0], [0, 0, -1, 1, -1, 1, 0]], eqns=[[-31, 1, 1, 1, 1, 1, 1]]); P
Out[2]: A 5-dimensional polyhedron in QQ^6 defined as the convex hull of 7 vertices

In [3]: P.Vrepresentation()
Out[4]:
(A vertex at (31, 0, 0, 0, 0, 0),
 A vertex at (0, 0, 0, 0, 0, 31),
 A vertex at (0, 0, 0, 0, 31, 0),
 A vertex at (0, 0, 31/2, 0, 31/2, 0),
 A vertex at (0, 31/2, 31/2, 0, 0, 0),
 A vertex at (0, 31/2, 0, 0, 31/2, 0),
 A vertex at (0, 0, 0, 31/2, 31/2, 0))

Available as extras, from other distributions

Additional features

pip install "passagemath-polyhedra[graphs]"

Face lattices, combinatorial polyhedra, graph-theoretic constructions

$ pipx run --spec "passagemath-polyhedra[graphs,test]" ipython

In [1]: from passagemath_polyhedra import *

In [2]: c5_10 = Polyhedron(vertices = [[i, i**2, i**3, i**4, i**5] for i in range(1, 11)]); c5_10
Out[2]: A 5-dimensional polyhedron in ZZ^5 defined as the convex hull of 10 vertices

In [3]: c5_10_fl = c5_10.face_lattice(); [len(x) for x in c5_10_fl.level_sets()]
Out[3]: [1, 10, 45, 100, 105, 42, 1]
pip install "passagemath-polyhedra[graphs,groups]"

Constructing symmetric polyhedra, computing automorphisms, lattice point counting modulo group actions

$ pipx run --spec "passagemath-polyhedra[graphs,groups,test]" ipython

In [1]: from passagemath_polyhedra import *

In [2]: P24 = polytopes.twenty_four_cell(); P24
Out[2]: A 4-dimensional polyhedron in QQ^4 defined as the convex hull of 24 vertices

In [3]: AutP24 = P24.restricted_automorphism_group(); AutP24.order()
Out[3]: 1152
pip install "passagemath-polyhedra[toric]"

Toric varieties

$ pipx run --spec "passagemath-polyhedra[graphs,toric,test]" ipython

In [1]: from passagemath_polyhedra import *

In [2]: TV3 = ToricVariety(NormalFan(lattice_polytope.cross_polytope(3))); TV3
Out[2]: 3-d toric variety covered by 6 affine patches

In [3]: TV3.is_orbifold()
Out[3]: False
pip install "passagemath-polyhedra[latte]"

Installs LattE integrale for lattice point counting and volume computation using generating function techniques.

$ pipx run --spec "passagemath-polyhedra[latte,test]" ipython

In [1]: from passagemath_polyhedra import *

In [2]: P = polytopes.cube()

In [3]: P.integral_points_count()
Out[3]:
27

In [4]: (1000000000*P).integral_points_count(verbose=True)
This is LattE integrale...
...
Total time:...
Out[4]:
8000000012000000006000000001

Additional backends for polyhedral computations

pip install "passagemath-polyhedra[normaliz]"

Normaliz, via PyNormaliz, provides very fast computations in particular for polyhedra with data in algebraic number fields.

$ pipx run --spec "passagemath-polyhedra[normaliz,test]" ipython

In [1]: from passagemath_polyhedra import *

In [2]: gap_norm = polytopes.grand_antiprism(backend='normaliz'); gap_norm

In [3]: gap_norm.f_vector()
pip install "passagemath-polyhedra[cddlib]"

cddlib provides support for computations with polyhedra in floating-point arithmetic.

$ pipx run --spec "passagemath-polyhedra[cddlib,test]" ipython

In [1]: from passagemath_polyhedra import *

In [2]: P1 = polytopes.regular_polygon(5, exact=False); P1
Out[2]: A 2-dimensional polyhedron in RDF^2 defined as the convex hull of 5 vertices
pip install "passagemath-polyhedra[lrslib]"

lrslib can be used for polytope volume computations and for enumerating Nash equilibria.

$ pipx run --spec "passagemath-polyhedra[flint,lrslib,test]" ipython

In [1]: from passagemath_polyhedra import *

In [2]: A = matrix([[2, 1], [1, 5/2]]); B = matrix([[-1, 3], [2, 1]])

In [3]: g = NormalFormGame([A, B]); g.obtain_nash(algorithm='lrs')
Out[3]: [[(1/5, 4/5), (3/5, 2/5)]]
pip install "passagemath-polyhedra[polymake]"

Polymake, via passagemath-polymake

Optional backends for optimization

pip install "passagemath-polyhedra[cbc]"

COIN/OR CBC Mixed Integer Linear Optimization solver, via passagemath-coin-or-cbc

pip install "passagemath-polyhedra[cplex]"

CPLEX Mixed Integer Optimization solver (proprietary; requires licensed installation), via passagemath-cplex

pip install "passagemath-polyhedra[cvxpy]"

CVXPy as middle-end for various backends

pip install "passagemath-polyhedra[gurobi]"

Gurobi Mixed Integer Optimization solver (proprietary; requires licensed installation), via passagemath-gurobi

pip install "passagemath-polyhedra[highs]"

HiGHS

pip install "passagemath-polyhedra[scip]"

SCIP Mixed Integer Optimization solver, via PySCIPOpt

Development

$ git clone --origin passagemath https://github.com/passagemath/passagemath.git
$ cd passagemath
passagemath $ ./bootstrap
passagemath $ python3 -m venv polyhedra-venv
passagemath $ source polyhedra-venv/bin/activate
(polyhedra-venv) passagemath $ pip install -v -e pkgs/sagemath-polyhedra

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

passagemath_polyhedra-10.10.1a0.tar.gz (992.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

passagemath_polyhedra-10.10.1a0-cp315-cp315t-macosx_13_0_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.15tmacOS 13.0+ x86-64

passagemath_polyhedra-10.10.1a0-cp315-cp315t-macosx_13_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.15tmacOS 13.0+ ARM64

passagemath_polyhedra-10.10.1a0-cp315-cp315-macosx_13_0_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.15macOS 13.0+ x86-64

passagemath_polyhedra-10.10.1a0-cp315-cp315-macosx_13_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.15macOS 13.0+ ARM64

passagemath_polyhedra-10.10.1a0-cp314-cp314t-macosx_13_0_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.14tmacOS 13.0+ x86-64

passagemath_polyhedra-10.10.1a0-cp314-cp314t-macosx_13_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.14tmacOS 13.0+ ARM64

passagemath_polyhedra-10.10.1a0-cp314-cp314-macosx_13_0_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.14macOS 13.0+ x86-64

passagemath_polyhedra-10.10.1a0-cp314-cp314-macosx_13_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.14macOS 13.0+ ARM64

passagemath_polyhedra-10.10.1a0-cp313-cp313-macosx_13_0_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

passagemath_polyhedra-10.10.1a0-cp313-cp313-macosx_13_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64

passagemath_polyhedra-10.10.1a0-cp312-cp312-macosx_13_0_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.12macOS 13.0+ x86-64

passagemath_polyhedra-10.10.1a0-cp312-cp312-macosx_13_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64

File details

Details for the file passagemath_polyhedra-10.10.1a0.tar.gz.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0.tar.gz
Algorithm Hash digest
SHA256 f779675f362a5875e75abe47b505e38a444f89ffb98ca9fe81b834ee7bc74ba0
MD5 3c2d630e6cb9307ad6102d5c90708350
BLAKE2b-256 8e4b14b58d376c6b75c4739c6f813b447fe24f5faff15a0f6ad7820af5b1614e

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp315-cp315t-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp315-cp315t-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 e6b0942a5e3fdb363b7023c4b56e56dbce65c4023ef3100ec8efb69ccb4fbe36
MD5 ccc5d0757cf1b61e1d96eef81b1cacf0
BLAKE2b-256 1915f6e1e1d9bcce1491f70916d477d541c317efba0c23d013b07614a24b1f65

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp315-cp315t-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp315-cp315t-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 5a6e622a7c07d3c8c35c4165ff9e541fa0883c72b36fac635e107a80746e2469
MD5 e12048fe15bf88031898385e9f2b75e3
BLAKE2b-256 b4b85722dc421650c41b9d18ee256378a027d98b62fbf11d6e129429dc700c7c

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp315-cp315-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp315-cp315-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 5d83ae18be04ed322e6dc30403adae8726a22234d964bfe6a4defe4a9d69ed18
MD5 262c20599277fcb44389ddc290a2c8fd
BLAKE2b-256 adf629a6b819ef509ce84282486cfbfc8e5fe35ce7fa87d5465427b87486704d

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp315-cp315-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp315-cp315-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 2f9a5104ca848da3c55cd67d8b459030626144db10a3a4985fe88c37a4e9fe72
MD5 0be70ea1c6f2b77215e70500a3dc0a80
BLAKE2b-256 de495b1f92fc026bfc74adb43448164f7ba266f0ee0cc72871df23d2fac9e40d

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp314-cp314t-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp314-cp314t-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 6f0ea95d6876af28f6211fd9d6a91f67260685cfaa8b326a546b35aa5debe61d
MD5 c860650082aebb1cbedb27e98188955e
BLAKE2b-256 eba640c05fb8b69443929e8410bb0002e066f466f758414f33969744a91c1b34

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp314-cp314t-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp314-cp314t-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 8983b19ec4803dddd18d881a0485ab31c4161f255c41987a7bbe1bb68b7b9bb1
MD5 d6ff69cdf967b8ee433e4cc1e54e0b63
BLAKE2b-256 3440925f858b9f62c6f0473db054ddc8ce93111df76fc4d342d980fcee75044d

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp314-cp314-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp314-cp314-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f6b3dce5671f36b51a351e4ade4f5be1ced5fd42514eb03ed4ca25bbd3029faa
MD5 df4c6f8239a7f4b295715de258274def
BLAKE2b-256 f03beea5c1bf4c0f03af63e5b5915c50a411c4d8b34b47614617237950ead032

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp314-cp314-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp314-cp314-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 0368a8d69b0a0f65e8547f4a84c302e507da9dcb094e67d5263a47a24e4ead76
MD5 91ba436fdf10adc8476e9527e11238ae
BLAKE2b-256 553d4dc22a21bfa68bda8e24ea7c7da771a38546b0b1e16f9d5b58e842ef73e0

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 cdfa3f30d1e851a1ea365203665aca6972243179e38aba6e6e3bb6777406550d
MD5 f7c1ee0b7060e9655244c1e7dddd2ada
BLAKE2b-256 d4f5bb4cfdf3cbae41a5b9edd9e8e97098b5b8606a3e575565374452257d604a

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp313-cp313-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp313-cp313-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 8300fb4742f8858411e4021f198ee82eb0469e9131bbd923a66c6c747d3818ea
MD5 2cd850d38890856b62a2bc89f0b3f8f3
BLAKE2b-256 59dc8c0d4d5d3bf7271783ab888a54ef4c141f699cc44fb91c859e84c88a6eec

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 acbcda5ba3fa52e01370f653c1aefbd4202538731c39f108192a05d9504f2cf0
MD5 4909d3c8ac39af8b65e2009d733264e0
BLAKE2b-256 2ef660922414a9a0c9b00ed9a11c65aad83faf314985564f39551678ba28a676

See more details on using hashes here.

File details

Details for the file passagemath_polyhedra-10.10.1a0-cp312-cp312-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_polyhedra-10.10.1a0-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 58038a2d622da4da0a76aed09c5a246ffb68a2b1b92ba68d850cb0181e502840
MD5 c76913476e1f88803ebe3327c815fc9e
BLAKE2b-256 0e0e36189c329b50dac85feafccb413cb5d543c3543f0f35809a3c8995c1388f

See more details on using hashes here.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page