15,080
stars
+12+18+88
5,672
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions
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 execute all tests, run:
$./setup.py test
in the current directory.
For the more fine-grained running of tests or doctests, use bin/test
or respectively bin/doctest. 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
tool