sympy /sympy
A computer algebra system written in pure Python
★ 15,095⑂ 5,696👁 289⑃ 16,133● 14,432▤ 59
+6
Daily
+27
Weekly
+92
Monthly
15,095
stars
5,696
forks
289
watchers
16,133
prs
14,432
issues
59
releases
README
SymPy
See the AUTHORS file for the list of authors.
And many more people helped on the SymPy mailing list, reported bugs,
helped organize SymPy's participation in the Google Summer of Code, the
Google Highly Open Participation Contest, Google Code-In, wrote and
blogged about SymPy...
License: New BSD License (see the LICENSE file for details) covers all
files in the sympy repository unless stated otherwise.
Our mailing list is at
.
We have a community chat at Gitter. Feel
free to ask us anything there. We have a very welcoming and helpful
community.
Download
The recommended installation method is through Anaconda,
You can also get the latest version of SymPy from
To get the git version do
$ git clone https://github.com/sympy/sympy.git
For other options (tarballs, debs, etc.), see
.
Documentation and Usage
For in-depth instructions on installation and building the
documentation, see the SymPy Documentation Style Guide.
Everything is at:
You can generate everything at the above site in your local copy of
SymPy by:
$ cd doc
$ make html
Then the docs will be in \_build/html. If
you don't want to read that, here is a short usage:
From this directory, start Python and:
python
from sympy import Symbol, cos
x = Symbol('x')
e = 1/cos(x)
print(e.series(x, 0, 10))
1 + x2/2 + 5x4/24 + 61x6/720 + 277x8/8064 + O(x10)
SymPy also comes with a console that is a simple wrapper around the
classic python console (or IPython when available) that loads the SymPy
namespace and executes some common commands for you.
To start it, issue:
$ bin/isympy
from this directory, if SymPy is not installed or simply:
$ isympy
if SymPy is installed.
Installation
To install SymPy using PyPI, run the following command:
$ pip install sympy
To install SymPy using Anaconda, run the following command:
$ conda install -c anaconda sympy
To install SymPy from GitHub source, first clone SymPy using git:
$ git clone https://github.com/sympy/sympy.git
Then, in the sympy repository that you cloned, simply run:
$ pip install .
See for more information.
Contributing
We welcome contributions from anyone, even if you are new to open
source. Please read our Contributor Guide
page and the SymPy Documentation Style Guide. If you
are new and looking for some way to contribute, a good place to start is
to look at the issues tagged Easy to Fix.
Please note that all participants in this project are expected to follow
our Code of Conduct. By participating in this project you agree to abide
by its terms. See CODE\_OF\_CONDUCT.md.
Tests
To run the tests and doctests, run:
$ python bin/test
$ python bin/doctest
in the repository root. Both commands accept paths to run specific tests
or doctests. The master branch is automatically tested by GitHub Actions.
To test pull requests, use
sympy-bot.
Regenerate Experimental LaTeX Parser/Lexer
The parser and lexer were generated with the ANTLR4
toolchaiTop issues
#3461Possible speed improvements to core147 comments · 2007-09-15#17945Look into using type hints141 comments · 2019-11-21#18445Matrix refactor - moving matrix methods to functions122 comments · 2020-01-24#28806Adding more type annotations to the codebase117 comments · 2025-12-21#15877Add support for configuration of the MathML printers85 comments · 2019-01-29#4986Separate boolean and symbolic relationals73 comments · 2010-04-07#6662Implement faster combinatorial enumeration algorithms70 comments · 2012-12-17#4719Derivative operator62 comments · 2009-08-29
Discussions
#31111About PR review1 comments · 2026-11-15#30899Target open problem0 comments · 2026-10-31#30870Question to _expand_partial_derivative() in class PartialDerivative1 comments · 2026-10-28#30819ExaktAI, SymPy, PRs, PDEs0 comments · 2026-10-23#30767physics.mechanics, Kane's method. Quaternions2 comments · 2026-10-18#30766physics.mechanics, quaternions2 comments · 2026-10-17#30709advice on the tradeoff between code complexity and performance3 comments · 2026-10-09#30689physics.mechanics Kane2 comments · 2026-10-07