Download source code

You can also download a development snapshot of the code. To obtain a reasonable stable snapshot, download from the master branch. To get the latest, greatest, and potentially very unstable snapshot, download from the the branch that corresponds to the major version of OpenSesane (e.g., heisenberg for 2.9, ising for 3.0).

Instructions for Mac OS

There are three ways to prepare the software environment for running OpenSesame from source on Mac OS X. You can either download and install all required packages manually, or compose the required source environment by using the repository-based package managers MacPorts or Homebrew. The easiest and preferred method nowadays to get OpenSesame working is by using Homebrew. This package manager works very fast, handles dependency requirements very well, and is very well maintained. The other package manager, MacPorts, is basically a large repository containing the source code of programs that have been ported from Linux to Mac OS X (which are very related as Mac OS X is also a Unix based system, as you might know). Compared to Homebrew, Macports takes an astoundingly long time to compile all dependencies. Furthermore, even though Macports used to work very well, it nowadays experiences a lot of 'breaks' due to dependency issues. The downside of homebrew is that it is 'less complete' than macports and you have to manually install many python packages (using easy_install or pip).

Download Xcode

If you want to install with either Homebrew or Macports, the first thing that you need to do is install Xcode, the Apple developer toolkit. You can get the latest version of Xcode for free from the App Store or from their website (you do need to login with an apple account though).

Using the App Store is preferable, as it will keep your version of X Code automatically up to date. You do need to also manually install the Command Line tools for X Code (and do this each time again after it is updated).

Installing with Homebrew

Homebrew is a newer and easier way to build a source tree on your mac. It has many benefits on top of macports, such as speed, and nowadays seems to have less trouble compiling and updating packages than macports does.
You can install homebrew as instructed on http://brew.sh/. Then issue the following command to get started:

brew update
brew doctor

Solve any issues that the 'doctor' command comes up with. This should be easy and usually the solutions (in the form of simple commands) are already given together with the problem statement.

Next, add some other required repositories by using homebrew's "tap" command:

Now it's time to start installing homebrew's own python environment. It's not really necessary to install another Python environment next to your system's python, but the Homebrew version is generally newer and better maintained, so it is definitely recommendable to do this.

brew install python

After python has been installed, you have to make it the 'default' python used by OS X. This means that the home-brewed python interpreter will be used whenever you issue the command 'python' in a terminal instead of the default system python. To do this type the command

echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile

This will position the reference to the folder in which all your homebrew stuff is located (/usr/local/bin) in front of the rest of the PATH variable. From now on, whenever you issue a command in your terminal, OS X will look in this folder first for the script or program to execute and if it doesn't find it there, it will continue to look in the other folders in the PATH variable. Close and reopen your terminal or enter the command

source ~/.bash_profile

to rerun the commands written in your .bash_profile. If you then run the command

which python

it should output something like '/usr/local/bin/python'. If it still outputs '/usr/bin/python', OSX is still using the default system python, which is not what you want. You can now continue with installing the rest of the required packages by executing

During installing you might receive an error with the message "Unknown locale UTF8". You can easily fix this by placing the line "LC_ALL=en_US.UTF8" in your ~/.bash_profile and then re-open your terminal.

You should now be able to run OpenSesame, but you'll notice you're missing some icons! You need to download the Faenza icon theme from http://tiheum.deviantart.com/art/Faenza-Icons-173323228 and place it under resources/theme/default/. Furthermore, there is a quirk in that multiprocessing won't work when the main file is not present as a .py file, which is the case for opensesame. To enable the multiprocessing support, you need to rename the opensesame file to opensesame.py, then if you run an experiment now once, you'll see that opensesame.pyc will have been created. From the moment this file is present, Python will use the .pyc when spawning new processes and you can now rename back opensesame.py to opensesame again. This is a weird fix to get multiprocessing working, but at the moment it is the only one we know.

The following packages are optional, but might be useful to install nevertheless:

Installing with MacPorts

Another way to install the necessary packages on Mac OS is by using MacPorts, a large repository of packages. It takes a long time (and by this I mean many hours!) to install all the packages that are required for running OpenSesame, because MacPorts works by compiling from source. But on the bright side, it's a pretty straightforward process.

Download MacPorts

You can download macports from its website on which you can also find the necessary documentation and a catalogue of all available packages.

You can add +universal to your /opt/local/etc/macports/variants.conf to ask MacPorts to build all ports you install with that variant (thus 32-bit and 64-bit versions packed in the same module), without having to remember to type it at every install command. However, some ports have not yet been tested as universal binaries and may not build properly.

Install dependencies

Essentially, you can now install all required packages by running a single command in a terminal:

Expyriment and Psychopy backends

Next to the legacy backend, which is based on pygame, OpenSesame also offers you the option of using expyriment or psychopy. In contrast to the legacy backend, both of these backends are hardware accelerated (OpenGL) and should have increased timing precision.

PsychoPy refuses to run without the wxPython library installed (which is weird, because OpenSesame doesn't use any of the wx GUI components of psychopy), so as a final step install wxPython with:

sudo port install py27-wxpython-dev

Make the MacPorts Python the default Python

Mac OS comes with a custom version of Python but, for our purpose (and many purposes), you need the official Python. This has already been installed by MacPorts, but you still need to make it the default. You can do this with the following command:

sudo port select --set python python27

Installing packages manually

If you want to install all Opensesame dependecies yourself you need to download and install the following package distributions:

Install Python

The python installation that comes with OS X is usually of an older version. Therefore it is better to install the newest version from python.org:

As described on the website, installation should proceed through the following steps:

Download the appropriate egg for your version of Python (e.g. setuptools-0.6c9-py2.7.egg). Do NOT rename it.

Run it as if it were a shell script, e.g.

sh setuptools-0.6c9-py2.7.egg

Setuptools will install itself using the matching version of Python (e.g. python2.7), and will place the easy_install executable in the default location for installing Python scripts (as determined by the standard distutils configuration files, or by the Python installation).
Afterwards, install most dependencies with the command:

sudo easy_install psychopy pyglet pyopengl pil expyriment

You may need to manually install Matplotlib, wxPython because (at the time of testing) these didn't install using easy_install. Make sure you install the versions that match your Python version.

NOTE: The psychopy backend does not seem to work yet and crashes. The reason is that PsychoPy (or rather its underlying library pyglet) can't cope with the 64-bit cocoa environment of the newer Mac OS X versions yet. In newer versions of psychopy this problem is hopefully solved.

Install wxPython (Optional, required for the PsychoPy backend)

You can download wxPython yourself or install it using easy_install (see "install PsychoPy").

Run OpenSesame

Download the source code of the latest OpenSesame release here. Extract the .tar.gz to your home folder (any other location works analogously). Open a terminal and switch to the location of OpenSesame (this example assumes that the version is 0.26):