Installing NumPy, SciPy, & Matplotlib on Debian Lenny (AMD64) with Python 2.6

I assume that Python 2.6 has already been installed from source on Lenny.

$ sudo apt-get install libatlas-headers libatlas-base-dev
$ sudo apt-get install libfftw3-dev libsuitesparse-dev
$ sudo apt-get install liblapack-dev gfortran swig

Download NumPy from the official repository.  Then

$ cd /usr/local/src
$ tar -zxf numpy-1.3.0.tar.gz
$ cd numpy-1.3.0
$ python2.6 setup.py build
$ sudo python2.6 setup.py install

Download SciPy from the official repository.  Then

$ cd /usr/local/src
$ tar -zxf scipy-0.7.1.tar.gz
$ cd scipy-0.7.1
$ sudo python2.6 setup.py install

Before installing matplotlib, I want to install wx, since I want to use it as the main GUI backend.  See this installation note if you need to build wxPython from source.  Be careful that when building against wxagg, you need

# export LD_LIBRARY_PATH=/usr/local/lib/wx/2.8/lib

right before running setup.py so that the installer can find the wxWidgets libraries.

Download Matplotlib from the official repository.  Then

$ cd /usr/local/src
$ tar -zxf matplotlib-0.99.1.1.tar.gz
$ cd matplotlib-0.99.1.1
$ emacs setup.cfg   # See README for how to configure.
$ su
# python2.6 setup.py install

This should do it.

This entry was posted in Uncategorized and tagged , , , , , , , . Bookmark the permalink.

One Response to Installing NumPy, SciPy, & Matplotlib on Debian Lenny (AMD64) with Python 2.6

  1. Alex says:

    Well done, thanks a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>