Skip to content


Subversion checkout URL

You can clone with
Download ZIP
The main development repo for SymPy
Python XSLT Other
Tag: sympy-0.5.14

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.



A Python library for symbolic mathematics.

All people who contributed to SymPy by sending at least a patch or more (in
the order of the date of their first contribution):
    Ondrej Certik <>
    Fabian Seoane <>
    Jurjen N.E. Bos <>
    Mateusz Paprocki <>
    Marc-Etienne M.Leveille <>
    Brian Jorgensen <>
    Jason Gedge <>
    Robert Schwarz <>
    Pearu Peterson <>
    Fredrik Johansson <>
    Chris Wu <>
    Kirill Smelkov <>
    Ulrich Hecht <>
    Goutham Lakshminarayan <>
    David Lawrence <>
    Jaroslaw Tworek <>
    David Marek <>
    Bernhard R. Link <>
    Andrej Tokarčík <>
    Or Dvory <>
    Saroj Adhikari <>
    Pauli Virtanen <>
    Robert Kern <>
    James Aspnes <>
    Nimish Telang <>
    Abderrahim Kitouni <>
    Pan Peng <>
    Friedrich Hagedorn <>
    Elrond der Elbenfuerst <>
    Rizgar Mella <>
    Felix Kaiser <>
    Roberto Nobrega <>
    David Roberts <>

And many more people helped on the SymPy mailinglist, reported bugs, helped
organize SymPy's participation in the Google Summer of Code, the Google Highly
Open Participation Contest, 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.

0. Download

$ hg clone

For other options (tarballs, debs, etc.), see the web page of SymPy.

1. Documentation and usage

Everything is at:

If you don't want to read that, here is a short usage:

From this directory, start python and:
>>> from sympy import Symbol, cos
>>> x = Symbol('x')
>>> e = 1/cos(x)
>>> print e.series(x, 0, 10)
1 + (1/2)*x**2 + (5/24)*x**4 + (61/720)*x**6 + (277/8064)*x**8 + O(x**10)

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:


from this directory if SymPy is not installed or simply


if SymPy is installed somewhere in your PATH.

3. Tests

to execute tests, run

./ test

in the current directory.  You need to have py.test installed.

4. How to install py.test

If you use Debian, just install the python-codespeak-lib. Otherwise:

Execute in your home directory:

svn co py-dist

This will create a "py-dist" directory in you home dir. Add this line to
your .bashrc:

eval `python ~/py-dist/py/`

Now you can call "py.test" from anywhere.

5. Clean

To clean everything (thus getting the same tree as in the svn):

./ clean

6. Brief History

SymPy was started by Ondrej Certik in 2005, he wrote some code during the
summer, then he wrote some more code during the summer 2006. In February 2007,
Fabian Seoane joined the project and helped fixed many things, contributed
documentation and made it alive again. 5 students (Mateusz Paprocki, Brian
Jorgensen, Jason Gedge, Robert Schwarz and Chris Wu) improved SymPy incredibly
during the summer 2007 as part of the Google Summer of Code. Pearu Peterson
joined the development during the summer 2007 and he has made SymPy much more
competitive by rewriting the core from scratch, that has made it from 10x to
100x faster. Jurjen N.E. Bos has contributed pretty printing and other patches.
Fredrik Johansson has wrote mpmath and contributed a lot of patches. Kirill
Smelkov has joined the development in autumn 2007 and has improved the overall
quality of SymPy a lot and is currently one of the most active developers.

7. Citation

To cite SymPy in publications use::

  SymPy Development Team (2008). SymPy: Python library for symbolic mathematics

A BibTeX entry for LaTeX users is::

    title = {SymPy: Python library for symbolic mathematics},
    author = {{SymPy Development Team}},
    year = {2008},
    url = {},

We have invested a lot of time and effort in creating SymPy. Although not
required by SymPy license, if it is convenient for you, we ask to please cite
SymPy when using it in your work.

Something went wrong with that request. Please try again.