## Preparing the python development environment

These are the instructions for preparing the python development environment for Unix. Your unix distribution may already have these packages available, but if it does not, or if the package versions are not supported by DANSE software, you may need to install them yourself.

Details for your distribution may already be available on the reflectometry wiki.

The core set of packages for DANSE/reflectometry are the following:

- Python 2.5
- BLAS/LAPACK
- Numpy
- Scipy
- Matplotlib
- wxPython

- easy_install (optional)
- IPython (optional)

A bundled suite of packages is available from Enthought for a fee.

### Python 2.5.1

### BLAS/LAPACK

It is better to use the blas/lapack that come with your distribution since they are likely to have ATLAS or vendor tuning. For example, Mac OS/X has the vecLib framework.

### Numpy

Numpy depends on LAPACK/BLAS. Binaries for numpy are available from source forge. Be sure to select the python 2.5 dmg file and follow the instructions therein. Building Numpy from source can be challenging.

### Scipy

SciPy depends on numpy. Binaries for numpy are available from source forge. Be sure to select the python 2.5 dmg file and follow the instructions therein. Building scipy from source can be very challenging.

### Matplotlib

Matplotlib depends on numpy. This package is probably needed. It is used by some server applications to generate plots for the web, by scripts for producing batch output and by GUI applications for showing interactive plots.### wxPython

wxPython is required for GUI applications only. Be sure to grab the wxPython source tree, not the wxWidgets source tree.

### Easy install

Easy install is a command line utility for downloading and building python packages. Save ez_setup.py to a temporary directory and open with "Python Launcher (2.5)".

The set of packages available from the Python Cheese Shop is extensive. Once easy_install is available, most of these packages can be installed using "easy_install packagename" from the terminal.

### IPython

IPython is an intractive python command line interface which allows you to mix plots and data analysis in your session. To install, use "easy_install ipython". Run it using "ipython -pylab". Now you will be able to use matrix operations and plotting commands directly, much like you would in Matlab(R) or IDL(R).