# Installation on Mac OS X

To install Cain, download the disk image and drag the application bundle to your Applications folder (or wherever you want to place it). The example data files are in the `examples` folder in the application bundle. They are also packaged separately in the `CainExamples` folder. You can drag this to a folder where you store data or documents. To uninstall Cain, simply drag the `Cain` application to the Trash.

To use Cain you will need Python, wxPython, numpy, matplotlib, and sympy. Unfortunately, Mac OS X comes with rather old versions of the first three and does not have matplotlib or SymPy. There are several ways of obtaining the necessary software to run Cain. The easiest solution is to install the Enthought Python Distribution. Alternatively, you can install the appropriate packages yourself. We consider these two alternatives below.

Enthought Python Distribution. As mentioned above the easiest way to get appropriate versions of python and the required packages is to download the Enthought Python Distribution. The EPD is designed for those working in scientific computing and comes with all of the packages that Cain needs. It is a commercial product, but is free for educational use if you are associated with a degree-granting institution. (Click on the "Academic" button at the bottom of the download page.) Note that you will need the 32-bit version; the 64-bit version does not have support for the wxPython package.

Installing Python packages yourself. The other option is to download and install the packages. Get the software from the sites indicated above. Just download the binaries; installation is a snap. For example, one could download and install the following packages.

- `python-2.7.2-macosx10.6.dmg`
- `wxPython2.8-osx-unicode-2.8.12.0-universal-py2.7.dmg`
- `numpy-1.6.0-py2.7-python.org-macosx10.3.dmg`
- `matplotlib-1.0.1-python.org-32bit-py2.7-macosx10.3.dmg`

Then follow the installation instructions on the SymPy web page. If you do not have the necessary packages installed, Cain will show an error message when you attempt to launch the application.

Lion or Snow Leopard. There is a complication with using the system version of Python. The default version of Python is a 64-bit application and the wxPython libraries will only work with the 32-bit version. The easiest solution is to install the Enthought Python Distribution. Otherwise you can either install a 32-bit version of Python from the Python web site, or you can configure the system version of Python to run in 32-bit mode. For instructions on the latter search for "wxpython snow leopard."

C++ compiler. In order to compile custom executables (either for kinetic laws that are not mass-action or to speed up simulations that use mass-action kinetics) you will need a C++ compiler. The GNU GCC compiler is freely available, but it is not installed by default. You can get it by installing Xcode, which is a free download in the App Store. By installing Xcode, you get the compilers as well as Apple's integrated development environment.