Installation Tips for Mac OS X

I've managed to get LSL working on Snow Leopard (10.6.6) using XCode 3.2.5, Lion using XCode 4.3, and various packages from  MacPorts. I've put together this guide to provide at least one configuration set that is known to work. I initially tried using  fink but ran into troubles trying to build 64-bit versions of the various packages. In particular, the matplotlib package is built incorrectly and does not contain the MacOS module and LSL will not test.


Note: MacPorts is a "moving target" and the commands listed here may need tweaking for the latest version.


The minimal set of port commands I used was to install various MacPorts packages were:

sudo port install pkgconfig
sudo port install python26
sudo port install python_select
sudo port install py26-gdbm
sudo port install py26-scipy
sudo port install py26-matplotlib-basemap
sudo port install fftw-3
sudo port install fftw-3-single
sudo port install atlas
sudo port install wget

After installing everything it is a good idea to re-source your Bash profile script and set the default Python installation to the 2.6 version installed by port:

. ~/.profile
sudo port select python python26

Other Software

Although MacPorts gets you most of the way there, a few of the python packages. For the python packages, easy_install works for pyephem, pyfits, and aipy. The first two are dependencies of aipy so all can be installed globally via:

sudo easy_install-2.6 aipy

Profiling Support

Python's cProfile module provides a convenient way to identify bottlenecks in various scripts but the raw output is less than helpful is a python script which can convert the output of cProfile to a dot graph for easy viewing. To use this script, you need to install graphviz through:

sudo port install graphviz

Supplemental Software for Extensions

In addition to the basic packages needed for LSL, there are several other packages needed to run the various extensions (SessionSchedules, Commissioning, etc.). These are:

  • wxPython
  • jinja2
  • h5py

These dependencies are easiest to install with MacPorts since the versions of these packages in fink are outdated, if even present. To install these packages with MacPorts:

sudo port install py26-jinja2
sudo port install py26-h5py
sudo port install py26-wxpython