sagemath
Sage: Open Source Mathematics Software: Standard Python Library
What it is and what it does
SageMath is a mature, actively maintained open-source mathematics platform designed as a viable alternative to commercial systems. It integrates symbolic computation, numerical methods, and visualization into a unified Python-based environment, leveraging 28 specialized libraries including sympy, numpy, scipy, matplotlib, and domain-specific packages like cypari2, networkx, and primecountpy.
The system is released under GPL-2.0-or-later and supports Python 3.12–3.14 across Linux, macOS, and Windows (via WSL or virtualization). Installation carries high friction due to compiled dependencies, but the project maintains active development and offers multiple deployment options: source builds, package managers, Docker images, and cloud-based environments. It is intended for education and scientific research, with comprehensive online documentation.
Use it for:
- Symbolic algebra and equation solving in research or educational settings without commercial licensing constraints
- Numerical computations combining linear algebra, calculus, and differential equations with visualization
- Number theory and cryptography research using integrated libraries like cypari2 and primecountpy
- Graph theory and combinatorics analysis via networkx integration
- Interactive mathematical exploration in Jupyter notebooks via ipykernel and ipywidgets
- Reproducible computational mathematics workflows in academic publications and open-source projects
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SageMath is a comprehensive open-source mathematics software system providing symbolic computation, numerical analysis, and mathematical visualization across algebra, calculus, number theory, and related fields.
Yes, with conditions. SageMath is a mature, actively maintained system suitable for academic and research use, with no known vulnerabilities and strong GPL-compliant licensing for open-source projects. However, install it only if you can meet the high friction cost: substantial disk space, a C/Fortran compiler, and patience for a significant build or container setup. For casual exploration, use cloud-hosted options first. Avoid if you need rapid installation or are building proprietary software without GPL compatibility.
Install
sagemath on PyPI
pip
pip install sagemathuv
uv add sagemathpoetry
poetry add sagemathInstalling sagemath
Before you install
High install friction: the package carries 28 runtime dependencies including compiled libraries (cypari2, cysignals, gmpy2, fpylll, pplpy) and requires substantial disk space for building from source. Maintenance is active with a recent release 102 days ago, supporting Python 3.12–3.14.
License in practice
Licensed under GPL-2.0-or-later (copyleft). Any derivative work or distribution must comply with GPLv2+ terms, including source code availability. Suitable for academic and open-source projects; proprietary software integration requires careful legal review.
Quickstart
from sage.all import *
# Example: symbolic computation
x = var('x')
equation = x**2 + 2*x + 1
factored = factor(equation)
print(factored) # Output: (x + 1)^2
Requires Python 3.12–3.14; building from source demands substantial free disk space, a C/Fortran compiler (gfortran on macOS via Homebrew), and sufficient RAM. macOS Apple Silicon (M1, M2, M3, M4) users must ensure clean /usr/local directory.
Verify before relying
- Whether pre-built binaries or conda packages reduce installation friction compared to source builds
- Performance characteristics and typical memory requirements during runtime
- Compatibility with specific Linux distributions beyond the general 'major distributions' claim
- Exact disk space requirements for runtime versus build-time operations
Package facts
| License | GPL-2.0-or-later (copyleft) |
| Python support | supports the current Python release (<3.15,>=3.12) |
| Install friction | high — source build required |
| Runtime dependencies | 28 — conway-polynomials, cypari2, six, cysignals, cython, fpylll, gmpy2, ipykernel, ipython, ipywidgets, jupyter-client, matplotlib, memory_allocator, mpmath, networkx, numpy, pexpect, pillow, platformdirs, pplpy, primecountpy, ptyprocess, requests, scipy, sphinx, sympy, pkgconfig, traitlets |
| Maintenance | actively maintained — 102 days since the last release |
| First released | |
| Downloads | 74,258/month — #14,857 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sagemath-10.9.tar.gz
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
passagemath-categoriesProvides Sage categories, basic rings,…
copyleft · top 15,000 on PyPI
passagemath-objectsProvides a foundational object system,…
copyleft · top 15,000 on PyPI
cypari2cypari2 provides a Python interface to PARI/GP,…
copyleft · top 15,000 on PyPI
passagemath-homflyProvides a Python interface to libhomfly for…
copyleft · top 15,000 on PyPI
passagemath-gapProvides Python interfaces to the GAP…
copyleft · top 15,000 on PyPI
audmathaudmath provides mathematical functions…
permissive · top 15,000 on PyPI
TheanoTheano is a Python library for defining,…
permissive · top 15,000 on PyPI
fpylllfpylll is a Python wrapper for the fplll…
unclear · top 15,000 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI