Download Installation

Raghav R V edited this page Apr 11, 2014 · 7 revisions

Download and Installation

All downloads

Latest release

Download the latest tar.gz from the featured downloads.

Extract the archive, on unix systems (Linux, BSD, Mac OS X, Cygwin, etc.) this

can be done with the command:

tar xzf sympy-*.tar.gz

Follow the installation instructions below or the README located in the newly created sympy directory.

You can also download it from the Python Package Index, either downloading the source (http://pypi.python.org/pypi/sympy) or running pip install sympy.

Previous releases

You can access all the previous (and other) downloads from the [[Google Code downloads page|http://code.google.com/p/sympy/downloads/list]].

This is useful if the latest release do not work for you for some reason.

Development version

To get the git repository, use: git clone git://github.com/sympy/sympy.git. This can be run locally using ./bin/isympy. To install globally, follow the instructions in the README file.

And you can also access the git repository on the web: https://github.com/sympy/sympy

Packages

Debian

SymPy is in Debian Lenny and later. The SymPy versions in Debian can be seen here: http://packages.debian.org/python-sympy

With current stable sources, you can install sympy by running:

apt-get install python-sympy

Ubuntu

SymPy is in Ubuntu Gutsy Gibbon (7.10) and later. The SymPy versions in Ubuntu can be seen here: http://packages.ubuntu.com/python-sympy.

With current versions, you can install sympy by running:

apt-get install python-sympy

Gentoo

SymPy is available in the portage tree. To install SymPy run:

emerge -av dev-python/sympy

The SymPy versions in Gentoo can be seen here: http://packages.gentoo.org/package/dev-python/sympy.

openSUSE

You can get it using the Build Service: or using zypper:

zypper ar
zypper in python-sympy

SAGE

SymPy is in SAGE 2.7 and later.

Windows

Download the latest windows installer from the [[featured Google Code downloads|http://code.google.com/p/sympy/downloads/list?q=label:Featured]] and execute it. There is one known issue with missing MSVCR71.dll, but SymPy works fine.

Mac OS X

An alternative for Mac OS X users is to use the Fink package manager system. You can install sympy by typing fink install sympy-py27. Replace py27 with whatever version of Python you want to use. The most recent version available is recommended. Do fink list sympy to see all available options.

Installation

To install SymPy from source, after downloading and unpacking the archive, enter the sympy directory and run the usual:

python setup.py install

You can use SymPy without installing. The prefered method is to use the isympy executable found in the ./bin folder.

$ ./bin/isympy
Python 2.4.4 console for SymPy 0.5.8-hg. These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z = symbols('xyz')
>>> k, m, n = symbols('kmn', integer=True)
>>> f = Function("f")
>>> Basic.set_repr_level(2)     # pretty print output; Use "1" for python output
>>> pprint_try_use_unicode()    # use unicode pretty print when available


In [1]: integrate(x*sin(x), x)
Out[1]: -x*cos(x) + sin(x)

In [2]: Integral(x**2 * sin(x), x)
Out[2]:
⌠
⎮  2
⎮ x *sin(x) dx
⌡

You can also use SymPy in an interactive Python shell going to the unpacked directory and running:

$ python
Python 2.4.4 (#2, Aug 16 2007, 02:03:40)
[GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sympy
>>>

Testing

Test that SymPy works:

>>> 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)

To run the full SymPy test suite, run ./setup.py test in the sympy directory. Note: you only need the standard Python 2.5 (or newer) to run all tests. If it fails work, please report the problem to the [[issue tracker|http://code.google.com/p/sympy/issues/list]].

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.