SymPy: Computer Algebra System in Python
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
- breaking ImportError: cannot import name 'Type' from 'typing'
- gotcha ImportError: cannot import name 'Symbol' from 'sympy.core.symbol'
Install
-
pip install sympy
Imports
- Symbol
from sympy import Symbol
Quickstart
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)