Download Installation

stalincse edited this page Mar 7, 2013 · 5 revisions
Clone this wiki locally

Download and Installation

All downloads


## Latest release

Download the latest tar.gz from the [[featured


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 ([[]]) or running `pip install sympy`.

## Previous releases

You can access all the previous (and other) downloads from the [[Google Code
downloads page|]].

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://`.
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:

# Packages

## Debian

SymPy is in Debian Lenny and later. The SymPy versions in Debian can be seen
here: [[]]

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: [[]].

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:

## openSUSE

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

zypper ar zypper in python-sympy


SymPy is in SAGE 2.7 and later.

## Windows

Download the latest windows installer from the [[featured Google Code
downloads|]] 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 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(xsin(x), x) Out[1]: -xcos(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)*x2 + (5/24)*x4 + (61/720)*x6 + (277/8064)*x8 + O(x**10)

To run the full SymPy test suite, run `./ 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