Running Nengo Under Mac OS X

Running Nengo Under Mac OS X

To install Nengo on a Mac, you must download the Nengo archive from the sourceforge project page. Open safari and navigate to the address http://nengo.ca. Download the newest version of Nengo by clicking Download and then clicking on the most recent release. Finally, click on the most recent release and then click to download the file that ends in `.tar.gz`. When this tutorial was written, the most recent version of Nengo was 1.0.1 : nengo-1.0.1.tar.gz.

By default, this file will download into the directory ~/Downloads/. Nengo is implemented as a java class and the easiest way to run java classes on a Mac is by using the Terminal application. To open Terminal, first open a new finder window and then type Terminal into the spotlight search bar. Many results might surface, but you should double click on Terminal.app.



If you have used Unix before, much of the following will be familiar. First, use cd to change directories to the directory into which you wish to install nengo. I chose ~/simulations. If you want to create a new directory then first use the mkdir command.

    $ mkdir ~/simulations
    $ cd ~/simulations
    $ cp ~/Downloads/nengo-1.0.1.tar.gz ./<br>

Now you must extract the downloaded archive:

$ tar vxfz nengo-1.0.1.tar.gz
    ...

To run nengo first change to the directory to which it is installed:

$ cd ~/simulations/nengo-1.0

You must use the command line java interface to start the nengo user interface. nengo uses several libraries and by default java does not know where they are, so they must be specified as an argument to the java command. I've included a short command to find all the required libraries and tell java where they are (NOTE: this is for the bash shell, which may not be your shell; for tcsh use setenv or set to change your paths):

$ CLASSPATH=`ls lib/*.jar | awk '{ printf $1 ":"}'`.:`ls nengo-*.jar`
    $ export CLASSPATH

The command to load the java class for the nengo interface is:

$ java ca.nengo.ui.NengoGraphics

The first time you start nengo it might take a while to load all of the libraries. This only happens once so it will load faster next time. You can add the CLASSPATH to your login script so that you don't have to enter it each time you want to start Nengo:

$ echo "CLASSPATH=$CLASSPATH;export CLASSPATH" >> ~/.profile

Now you are ready to simulate neurons and create networks!