Table Of Contents

Previous topic

Welcome to PyMMF’s documentation!

Next topic

Details

This Page

Introduction

Prerequisites

In order to use the PyMMF package libraries, you should have the following installed and working.

Enthought Python Distribution

This is not a strict requirement, but most of following dependencies will be satisfied if you use the Enthought Python Distribution (EPD). This is a recommended way of installing a current version of python and most of the required tools.

There is one major caveat however. You must have a binary compatible compiler and libraries installed on your system corresponding to the version used to compile the EPD. In particular, if you have a 64 bit OS (with the corresponding 64 bit libraries), then you probably need to install the 64 bit version of EPD to make use of the extension packages and compiled code.

If you can’t get the correct EPD distribution, then you may have to install a compatible compiler and compile a version of the standard libraries compatible with what EPD was compiled with in order to use these features. (See my Gobo install package for some ideas about how you might do this without root access.)

I suspect that if you purchase one of the subscriptions, then you will receive some support with this. (Note that the EPD is now available in both 32 and 64 bit versions for academic use.)

EPD Components

The EPD provides far more than required by this package: here are the specifics. First the required components provided by the EPD.

Python (http://www.python.org/)
Version 2.5 or higher (tested with 2.5.2). I have not attempted to use version 3.0 or higher yet and won’t until numpy and scipy have fully migrated.
setuptools (http://peak.telecommunity.com/DevCenter/setuptools)
This allows you to easy_install lots of python goodies, and is used by the setup.py installation script. This will be installed automatically if you do not have it.
NumPy (http://numpy.scipy.org/)
For optimal performance, this should be built with optimized BLAS and LAPACK libraries. I have had some problems with this on 64 bit platforms though using ATLAS in the past, although the Enthought distribution seems to work now.
SciPy (http://www.scipy.org/)
This also depends on the FFTW if you want good performance.
matplotlib (http://matplotlib.sourceforge.net/)
This has a few other requirements, including the zlib and freetype libraries. You will also need to have some sort of GUI toolkit installed such as wxPython, GTK etc. Note that Python comes with its own TkInter GUI toolkit, so this interface should be provided across all platforms.
PyTables (http://www.pytables.org/)
This is required by mmf.archive.Archive to efficiently store large arrays of data. It is only required if the datafile option is specified along with the pytables option. This is easy-installable after installing the hdf5 library but may require an up to date version of PyRex (which is also easy-installable).
nose (http://somethingaboutorange.com/mrl/projects/nose/)
This is a testing framework. Not strictly required, but to run my unit tests you need this. SciPy and NumPy are switching to this, so it should be easy to get and install.

Other Components

The following requirements are not met by the EPD. You will need to install these in addition to get the full functionality.

Parallel Python (http://www.parallelpython.com/)
Provides a way of controlling many processes. Used in mmf.async.pp_mmf.
pexpect (http://www.noah.org/wiki/Pexpect)
Provides a nice interface for controlling other processes. Used in mmf.async.pp_mmf.
winpdb (http://winpdb.org/)
This is a GUI and pdb replacement that allows for remote debugging. I use it in mmf.async.remote_debug. Importing mmf will insert a signal handler that will start the debugging server so that winpdb can be used to debug the process. See mmf.async.remote_debug for more details.
pygsl (http://pygsl.sourceforge.net/)
Sometimes I use the Python wrappers for the GNU Scientific Library (GSL). This has some additional useful functionality, esp. some special functions and series summation functions. I use this for doing lattice sums for implementing the DFT in a box.
bvp (http://pav.iki.fi/software/bvp/index.html)
The module mmf.math.ode.deq uses Pauli Virtanen’ wrapper for the COLNEW boundary value problem solver by U. Ascher and G. Bader.
cvxopt (http://abel.ee.ucla.edu/cvxopt/)
This provides optimizers for convex optimization. I don’t use this much, but was playing with it in mmf.math.integrate.integrate_1d.quadrature.
scikits.delaunay (http://scikits.appspot.com/delaunay)

This is required for the multidimensional tabulation algorithm in mmf.math.interp:

svn checkout http://svn.scipy.org/svn/scikits/trunk/delaunay

There are some routines in this package written in C++ or Fortran, so you may need to run the files setup.py with the build or build_ext options and link the resulting library to the same directory that setup.py was in, for example:

:math:` cd /python/mmf/math/integrate
` python setup.py build_ext
<output suppressed>
:math:` ln -s build/lib.macosx-10.3-i386-2.5/_dcuhre.so .
Sphinx (http://sphinx.pocoo.org/, http://bitbucket.org/birkenfeld/sphinx/)

This documentation is built using the Sphinx documentation generation system. Some features of the present documentation require using the modified version I distribute here:

http://bitbucket.org/mforbes/sphinx-mmf/

A few extensions require additional packages, including the following:

GraphVis (http://graphviz.org/)
For building inheritance diagrams and a few other graphs
LaTeX

For typesetting math using the pngmath extension. This can also benefit from the preview-latex package:

numpydoc

This can be installed from the numpy source tree as a separate package:

` svn checkout http://svn.scipy.org/svn/numpy/trunk/doc/sphinxext numpydoc
:math:` cd numpydoc
` python setup.py install

Installing

Right now I recommend installing this bye issuing:

python setup.py develop

in the top level directory (containing the setup.py file). You should also be able to install this package by running:

python setup.py build
python setup.py install

but I have not tested this yet. (In particular, some of the components such as contrib in the top level directory will probably not get installed.)