Psychtoolbox-3 Download, Installation, and Update
First, you should make sure you don't already have Psychtoolbox-3. Type the following in the Matlab command window:
>> PsychtoolboxVersion
The first number in the output is the version number. If it is 3.0.8 or greater, then you have Psychtoolbox-3.
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.
Removing Old Versions of Psychtoolbox
To find the Psychtoolbox installation directory, type the following in the Matlab command window:
>> PsychtoolboxRoot
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.
Installation Instructions for Windows and Mac OS X
These are simple instructions to get you up and running with the Psychophysics Toolbox on a Windows or Macintosh OS X computer (instructions for GNU/Linux are on a separate page). It is assumed that you already have Matlab installed on your computer. See the System Requirements.
1. Download Subversion installer
- Windows: svn-1.4.2-setup.exe
- Mac: Subversion-1.4.3.pkg.zip (Older, but official, installer: subversion-client-1.3.1.dmg)
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.
4. Read the instructions relevant to your operating system below.
Mac
a. Decompress the installer:
i. If the downloaded file's name ends with .zip, then double-click it to decompress it.
ii. If it ends with .m, then continue to the next step.
b. Open Matlab and type the following in the command window:
>> cd ~/Desktop
>> DownloadPsychtoolbox('current')
The second command will take a long time and generate a lot of output. Please be patient.
If you want to know more, type help DownloadPsychtoolbox in the Matlab command window.
Windows
a. Open the My Computer icon (it is either on the desktop or in the Start Menu).
b. Double-click on the C: drive icon.
c. Create a new folder called toolbox.
d. Move the Psychtoolbox installer (DownloadPsychtoolbox) from the Desktop to the new toolbox folder.
e. Decompress the installer:
i. If the downloaded file's name ends with .zip, then double-click it to decompress it.
ii. If it ends with .m, then continue to the next step.
f. Open Matlab and type the following in the command window:
>> cd C:/toolbox
>> DownloadPsychtoolbox('current', 'C:/toolbox')
The second command will take a long time and generate a lot of output. Please be patient.
If you want to know more, type help DownloadPsychtoolbox in the Matlab command window.
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.
Staying Up-to-Date
Psychtoolbox-3 can be updated to the latest version by typing the following Matlab command:
>> UpdatePsychtoolbox
For more information, type the following:
>> help UpdatePsychtoolbox
Downgrading
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.
More Information
Subversion
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/.
Access to Archived Versions of PTB-3
You can also choose to install specific old versions of PTB-3 by providing their name instead of 'current' or 'stable'. E.g., to download Psychtoolbox-3.0.6 you would run DownloadPsychtoolbox('Psychtoolbox-3.0.6'). A list of older versions can be found at the bottom of the page found here.
OLD CONTENT OF INSTALLATION PAGE
The toolbox is now stored on a publically accessible SVN (Subversion) revision control server. This allows us to simplify maintainance of the toolbox and to make updates immediately available to the user community. The new installation procedures connect to the server and retrieve and install the toolbox for you. Thus, installing and updating are now pretty much automated. If you already have the UpdatePsychtoolbox.m script, just type:
help UpdatePsychtoolbox
and follow the instructions. Otherwise, first make sure you don't have any old obsolete version(s) by typing:
which DownloadPsychtoolbox -all
If you find it, then delete it, eg:
delete /Applications/Psychtoolbox/DownloadPsychtoolbox.m
After getting rid of the old version(s), download the installer, which is a file called DownloadPsychtoolbox.m . Add the folder containing the file to your Matlab path. To add a path, select the menu item "File:Set Path" and click the "Add Path" button. (Or change your working directory in Matlab to the folder containing the file.) Then type "help DownloadPsychtoolbox" at the Matlab prompt, and follow the instructions.
help DownloadPsychtoolbox
You'll run either DownloadPsychtoolbox('current') or DownloadPsychtoolbox('stable') to specify which flavor of the Psychtoolbox you want to use. We recommend the "current" (also called "beta") flavor for most users. The "stable" flavor represents an older, archived, snapshot, which might be useful in particular circumstances. Once you download the toolbox via DownloadPsychtoolbox, you can update your toolbox at any time by running UpdatePsychtoolbox, which is included in your new Psychtoolbox. Each update downloads only the files that have been modified since the last update or download, thereby saving download time.
Downgrading in Case of Trouble
The UpdatePsychtoolbox script also allows you to downgrade to an earlier version of Psychtoolbox. After an update, if you find something broken you might want to back out to an earlier version. To downgrade to a previous revision, type: UpdatePsychtoolbox(PsychtoolboxRoot, 'PREV'). You can repeat this step to incrementally downgrade to earlier versions.
Access to Archived Versions of PTB-3
You can also choose to install specific old versions of PTB-3 by providing their name instead of 'current' or 'stable'. E.g., to download Psychtoolbox-3.0.6 you would run DownloadPsychtoolbox('Psychtoolbox-3.0.6'). A list of older versions can be found at the bottom of the page found here.
Microsoft Windows
Under Microsoft Windows, when you first install the Subversion client, you will need to reboot your Windows machine before proceeding, otherwise our installer won't find the svn client.
Under Microsoft Windows, you must provide an absolute path to a folder where you want your copy of PTB-3 installed, e.g., DownloadPsychtoolbox('beta', 'C:\toolboxes\') to install the PTB into a subdirectory of C:\toolboxes\. The specified path must not contain any white space.
Mac OS X
On Mac OS X, providing the path is optional. The installer will set a reasonable default path if you omit the specification.