scipy Getting started with scipy Installation or Setup


Scipy contains parts written in C, C++, and Fortran that need to be compiled before use. Therefore make sure the necessary compilers and Python development headers are installed. Having compiled code also means that Scipy needs additional steps to import from development sources, which are explained below.

Fork a copy of the main Scipy repository in Github onto your own account, then create your local repository via:

$ git clone scipy
$ cd scipy
$ git remote add upstream git://

To build the development version of Scipy and run tests, spawn interactive shells with the Python import paths properly set up, and so on. Do one of the following:

$ python -v
$ python -v -s optimize
$ python -v -t scipy/special/tests/
$ python --ipython
$ python --python
$ python --bench

This builds Scipy first, so it may take a while the first time. Specifying -n will run the tests against the version of Scipy (if any) found on the current PYTHONPATH.

Using is the recommended approach to running tests. There are also a number of alternatives to it, for example in-place build or installing to a virtual environment. Some tests are very slow and need to be separately enabled.

Link to API

Ubuntu & Debian

Run command

sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose

The versions in Ubuntu 12.10 or newer and Debian 7.0 or newer meet the current SciPy stack specification. Users might also want to add the NeuroDebian repository for extra SciPy packages.