In order to install and use the Psychtoolbox, you must already have Matlab or Octave installed on your computer. If you already have Matlab or Octave installed, start it up and read on.
- Removing Old Versions of Psychtoolbox
- Installation Instructions
- Installation without Download
- Staying Up-to-Date
- More Information
First, you should make sure you don't already have Psychtoolbox-3. Type the following in the Matlab command window:
The first number in the output is the version number. If it is 3.0.8 or greater, then you have Psychtoolbox-3. Pick one:
- If you have an older version of Psychtoolbox, remove it by following the instructions in the next section, Removing Old Versions of Psychtoolbox.
- If you don't have Psychtoolbox-3 at all, read the Installation Instructions below.
- If you do have it, skip down to the Staying Up-to-Date section below.
If you have an old version of Psychtoolbox installed, the installer will prompt you if it should automatically delete those version from your filesystem and do so if you agree. If you want to delete the folder manually, apply the following procedure.
To find the Psychtoolbox installation directory, type the following in the Matlab command window:
Find that folder and drag it to the Trash or Recycling Bin. Then type pathtool in the Matlab command window. This will bring up a dialog box with a list of folders that Matlab searches to find commands. Select all the folders that have "Psychtoolbox" in the name and click the "Remove" button.
These are simple instructions to get you up and running with the Psychophysics Toolbox on a computer. It is assumed that you already have Matlab or Octave installed on your computer. See the System Requirements.
1. Download Subversion installer
- Windows: Subversion 1.7.2, 32 bit
- Mac: Subversion 1.6.9 (Switch to the "Community Binaries" tab and then click the orange Download button). Skip this step on OSX 10.5 Leopard or later if you have Apple's XCode development tools installed, as Subversion is then already installed on your system by default.
- Linux: Get the subversion package from your Linux distribution’s archive (i.e. apt-get install subversion, yum install subversion, or equivalent), and skip step 2., it’s installed.
2. Install Subversion by double-clicking on the installer downloaded in Step 1. Run the installer and select all the default options.
- Mac: You may have to double-click on the file once to decompress it or to mount the disk image (a .dmg file), then again on the decompressed file to run the installer.
- Windows: You should now quit and restart Matlab.
3. Download the Psychtoolbox installer to your desktop. You do this by right-clicking on the link with your mouse, then select "Save link target as..." or "Save linked file" or however this is called in your webbrowser.
4. Read the instructions relevant to your operating system below.
>> cd ~/Desktop >> DownloadPsychtoolbox
Psychtoolbox for Linux is available either from us directly for computers with Intel compatible processors, or via the NeuroDebian repository for neuroscience software for Intel compatible computers running a Debian or Ubuntu Linux distribution or a derivative thereof. It is also available as part of the "testing" and "unstable" branches of Debian GNU/Linux as well as Debian 7 for various non-Intel processors, e.g., PowerPC, ARM, MIPS, Sparc, IBM S/390. NeuroDebian provides installation instructions on its website. Ubuntu 12.10 also provides Psychtoolbox as part of the operating system. Debian and Ubuntu 12.10+ provides Psychtoolbox via the standard apt/dpkg software management system under the name "psychtoolbox-3". If you use a Debian or Ubuntu Linux distribution, NeuroDebian or Debian provide the most convenient method of installing Psychtoolbox and keeping the software up to date. The default installation from these sources will only provide GNU/Octave support. Run the script DownloadAdditionsForNeuroDebian from within Matlab after the installation for octave to install the Matlab versions as well.
If you want to install from our own repository, e.g., because you use a different Linux distribution or just like to install directly from us, then the following will work:
- Open the My Computer icon (it is either on the desktop or in the Start Menu).
- Double-click on the C: drive icon.
- Create a new folder called toolbox. This assumes you want to install into the toolbox folder.
- Move the Psychtoolbox installer (DownloadPsychtoolbox) from the Desktop to the new toolbox folder.
- If you want to use the 64-Bit Psychtoolbox for 64-Bit Matlab, you must install the 64-Bit GStreamer SDK from www.gstreamer.com, otherwise Psychtoolbox will not work and the installation will abort.
- You also need to install the Microsoft Runtime Libraries for MSVC 2010. You can find installers for these at Microsofts site or, after the download completed, but the installer aborted half-ways, follow the instructions of the installer.
- Open Matlab as administrator (for Windows 7, right-click Matlab shortcut and Run As Administrator) and type the following in the command window:
>> cd C:/toolbox >> DownloadPsychtoolbox('C:/toolbox')
- For multi-media support (video playback, video creation, video capture and video recording) you will need to have GStreamer installed on your system. See help GStreamer for installation instructions on your system.
You should now have a complete Psychtoolbox installation. Occasionally type the command UpdatePsychtoolbox in the Matlab command window: this will ensure that you have the latest version of Psychtoolbox. To start learning about the Psychtoolbox, use the help command. For example,
>> help Psychtoolbox
will list the categories of functions in the toolbox, and
>> help PsychDemos
will list all the demos available.
A PDF file with the presentation slides of an introduction into Psychtoolbox-3 and the differences to Psychtoolbox-2:
Talk slides of Psychtoolbox presentation, given at ECVP 2007 Arezzo
Class notes for beginners can be found at:
If you already have downloaded a copy of the Psychtoolbox folder onto a local computer and want to replicate that installation onto other computers you don't need to download the toolbox again. Instead, simply copy the Psychtoolbox folder to the other target machines. Next, startup Matlab or Octave on that machines, change Matlab's or Octave's working directory to the copied Psychtoolbox folder (cd command) and then type SetupPsychtoolbox (see SetupPsychtoolbox or type help SetupPsychtoolbox). The SetupPsychtoolbox script will setup your copied local Psychtoolbox folder for use with Matlab or Octave, just as our installers would do. This procedure can safe some download time.
Psychtoolbox-3 can be updated to the latest version by typing the following Matlab command:
For more information, see UpdatePsychtoolbox or type help UpdatePsychtoolbox inside Matlab.
If the installer complains about being not able to find the Subversion client "svn" because it is installed in an unusual location, you can try to locate the client yourself on your filesystem by use of your operating systems search functions and then add the path to the folder which contains the "svn" executable to your Matlab or Octave path. E.g., if the svn client is found under /opt/local/bin/svn, do a addpath('/opt/local/bin') in Matlab or Octave, save the path via savepath and then retry.
Sometimes the downloader fails with a message like "Command CHECKOUT failed with error code xxx" with xxx being some number, followed by a description of the error condition. You may see any of these, or similar messages referring to the network or connections...
svn: PROPFIND of '/svnroot/repos/osxptb/unsupported/Psychtoolbox': could not connect to server (http://svn.berlios.de)
svn: Connection timed out ...
svn: Connection refused ...
This can mean two things:
- Subversion server is down
... our Source code repository server on BerliOS.de or part of your internet connection is experiencing temporary problems. Don't panic, just wait a couple of minutes (sometimes a couple of hours) and retry.
- Subversion server cannot be reached due to a network proxy or firewall
Your institution might route all web traffic trough a local proxy server, which can interfere with the operation of Subversion because it also uses HTTP to check-out the Psychtoolbox from the repository.See FaqDownloadFails to learn how to teach svn to use your institutions proxy.
If the updater fails with a message like ...
svn: E155036: Working copy '/opt/MATLAB/R2011b/toolbox/Psychtoolbox' is too old (format 10, created by Subversion 1.6)
... then open a terminal window, cd into the Psychtoolbox folder and then run the command "svn upgrade". Then rerun the UpdatePsychtoolbox command. Alternatively, if you haven't made any modifications to your Psychtoolbox folder, simply rerun DownloadPsychtoolbox to install a fresh copy of Psychtoolbox.
If everything else fails, contact the Psychtoolbox forum with a description of what you tried.
Installing Psychtoolbox-3 requires Subversion because the toolbox is now kept in a Subversion database, which is stored on a publicly accessible server. The database both stores the latest version of the code and tracks all of the changes that have been made to it. This simplifies maintenance and development of the toolbox. The Psychtoolbox functions DownloadPsychtoolbox and UpdatePsychtoolbox automate interactions with the database, so you never have to use Subversion directly. To learn more about Subversion, you can visit the website: http://subversion.tigris.org/.
If you find something broken after an update, then you might want to revert to an earlier version. The UpdatePsychtoolbox script allows you to downgrade to an earlier version of Psychtoolbox. To downgrade to the previous version, type in the Matlab command window:
>> UpdatePsychtoolbox(PsychtoolboxRoot, 'PREV')
You can repeat this step to incrementally downgrade to earlier versions.
You can also choose to install specific old versions of PTB-3 by providing their name instead of 'current' or 'unsupported'. E.g., to download Psychtoolbox-3.0.6 you would run DownloadLegacyPsychtoolbox(, , , 'Psychtoolbox-3.0.6'). A list of older versions can be found at the bottom of the page found here. Version 3.0.10 and later use the DownloadPsychtoolbox function instead of DownloadLegacyPsychtoolbox.