SymPy: Computer Algebra System in Python

1.14.0 · active · verified Sat Mar 28

SymPy is a Python library for symbolic mathematics, enabling exact computation with algebraic expressions, calculus, matrices, and equations. The current version is 1.14.0, released on March 28, 2026, with a regular release cadence of approximately every 6 months.

Warnings

Install

Imports

Quickstart

A simple example to define symbols, create an equation, and solve for a variable using SymPy.

from sympy import symbols, Eq, solve

# Define symbols
x, y = symbols('x y')

# Define an equation
equation = Eq(x + y, 10)

# Solve the equation
solution = solve(equation, x)
print(solution)

view raw JSON →