Developer Manual
Home News Downloads Tutorials User Manual Reference Manual Developer Manual Forums Team Members Future Work FAQ Links MacPorts Python
This is a complete guide on how to set up Topographica on Mac OS X 10.6.* using a MacPorts Python 2.7/2.6 and extensions.
The EPD (Enthought Python Distribution) is preferable to those who wish to install a basic Python distribution with minimum hassle.Compared to the EPD there are several major advantages to building your own dependancies. Firstly Topographica will not currently run on the 64bit EPD 7.0 distribution due to various missing dependancies, to run Topographica in 64bit on OS X you must build according to the instructions below. Luckily those missing dependancies are present on the 32bit EPD 7.0, though it has it's own set of disadvantages - namely it ues Tk/Tcl 8.4 as opposed to 8.5, and also it uses the older FixedPoint for simulation time (vs. the faster gmpy). There are also currently issues with audiolab on the EPD, though there is now a workaround, see the Optional Installs section if you need audiolab.
In summary the method outlined below provides greater speed and compatibility than the EPD, especially when using Topographica's GUI. If none of these issues are important to you we advise using the 32bit EPD for simplicity.
Development Environment
A valid development environment is required before proceeding, as of OS X 10.6.7 there are 2 ways to achieve this. One is paid, the other free. It is unknown how long the free option will continue to exist, the paid option is currently £2.99 ($4.99).
The 2 versions are currently equivalent for the purposes of building Topographica, unless you want the new Xcode Code Editor we advise the free Xcode 3.2.6. Only the Xcode Essentials and UNIX development tools are required for building Topographica, the remaining Xcode install options can safely be omitted.
Free Option: [Apple Developer Website] install Xcode 3.2.6 from the link in the lower bottom right of the page.
Paid Option: [Mac AppStore] install Xcode 4.*The following free tools provide the package manager and the X11 windowing system. Both are required.
[MacPorts Website] install MacPorts
[XQuartz Website] install XQuartzRestart!
Topographica Requirements
Run the following in a shell to install everything needed for Topographica, if you want to run Python 2.6 instead of 2.7 simply replace any instances of 27 with 26, and 2.7 with 2.6
sudo port selfupdate
sudo port install tcl +threads tk python27 py27-numpy py27-pil py27-matplotlib py27-scipy py27-ipython gmp python_select
sudo python_select python27
sudo rm /opt/local/bin/ipython
sudo ln -s /opt/local/bin/ipython-2.7 /opt/local/bin/ipython
curl http://gmpy.googlecode.com/files/gmpy-1.14.zip > gmpy-1.14.zip
unzip gmpy-1.14.zip
cd gmpy-1.14
sudo python setup.py install
Getting and Building Topographica
The following information is from the Topographica Developer Guide, it's included here for convenience with the specific commands for an external Python setup.
export TOPOROOT=https://topographica.svn.sourceforge.net/svnroot/topographica
svn co $TOPOROOT/trunk/topographica topographica
cd topographica
svn update
make topographica-other-python
You can also delete Topographica's external folder as you're now using your own system binaries.
rm -rf external
Optional Installs
AudioLab with Python 2.7
The audiolab package must be installed to use any of Topographica's auditory system models, however at the time of writing this guide no native Python 2.7 version exists so one must install the Python 2.6 version and manually copy it into the 2.7 directory. You can check if a 2.7 version of audiolab has been released by running:
port search py27-scikits-audiolabIf one was found simply run the corresponding install and you're done:
sudo port install py27-scikits-audiolabOtherwise running the following single command should cause MacPorts to automatically install all the required dependancies including Python 2.6, and build audiolab:
sudo port install py26-scikits-audiolabOnce that is done you only need to copy it into place for Python 2.7 and you're done.
sudo cp -r /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scikits* /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/AudioLab with 32bit EPD 7.0
The same principle applies to using audiolab with a 32bit EPD, except one must run the following commands:"
sudo port install py26-scikits-audiolab +universal
sudo cp -r /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scikits/audiolab /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scikits/Notes/Issues
If you have any issues launching the GUI simply reinstall XQuartz and reboot.
Hosted by: ![]()
James A. Bednar (jbednar@inf.ed.ac.uk) Last update: Tue Nov 1 9:50:29 UTC 2011.