SymPy performs symbolic mathematics in Python, aiming to be a full computer algebra system while staying lightweight. Install via pip, conda, or Anaconda.
Overview
SymPy is a Python library for symbolic mathematics written entirely in Python. It targets interactive computer algebra as well as embedding symbolic routines into larger scientific, engineering, and educational software.
Users work in Python scripts, applications, or the bundled console wrapper `isympy`, which loads the SymPy namespace in a standard or IPython session. Documentation and an online shell are available, and the library depends on mpmath for arbitrary-precision floating point.
Beyond interactive use, SymPy is designed to be imported into other projects. Downstream tools in physics, chemistry, computer algebra, finite elements, optimization, and related domains build on SymPy for scalar or symbolic algebra tasks.
Installation options include pip, Anaconda conda packages, and installing from a git checkout with pip. SymPy is BSD-licensed and extensible with custom functions when embedded in applications.
Key features
- Symbolic expression manipulation
- Pure Python implementation
- Interactive isympy console
- Embeddable in other apps
- mpmath arbitrary precision
- Documentation and online shell
- pip and conda installation
- Extensible custom functions
Use cases
- Symbolic algebra in Python scripts
- Teaching and notebook workflows
- Embedding CAS routines in apps
- Generating reference expressions for tests