Press "Enter" to skip to content

Free & Useful Software – PsychoPy

Last updated on September 16, 2019


This post will describe why I prefer using PsychoPy before other software. When I started getting involved in research (i.e., when doing my Bachelor’s and Masters theses) I used the software that was accessible for me. That is, some of the most commonly used software at the department I was studying at. After starting my Ph.D. studies I got more and more annoyed with one of the software we used to build experimental tasks  in (i.e., E-prime).

First, I was not familiar with the scripting language (called ‘e-basic’) that was needed, for instance use, to solve pseudo-randomization, and for sending signals to a specially built device I was going to use in my experiments. Second, I prefer to use Linux systems and e-prime is limited to Windows. In fact, e-prime seemed to be working best Windows Vista or earlier but our lab computers were, and are, running Windows 7 (might have changed since back then). Some time into my Ph.D. studies I found PsychoPy which is written in Python, a programming language that I did know, and it seemed like a good alternative to e-prime, and other similar software, to create experiments in.

PsychoPy imported in Spyder
  • Save
Example of importing PsychoPy modules and methods in Spyder.

On PsychoPy’s website it is stated that is an open-source application to present  stimuli and collect data in experiments. Being Open Source it also means that the software is free. Importantly, it can be run on Linux, OS-X, and Windows.  One of the features that I like most is that I can choose to write code or to use an experimental builder such that of e-prime. Personally, I prefer to write scripts and not using a Builder. However, when coding I  existing modules and methods in PsychoPy.

Since I am running Linux on my computers it is possible for me to use my favourite Python IDE (Integrated Development Envirionment) called Spyder. I just import the modules and/or methods I need in my script and then I can run experiments from within Spyder. I assume, but don’t know, that you can use your favourite IDE in other OS’ also… PyCharm, however, is also one of the best Python IDEs that I have used.


Why students should use PsychoPy

For the less coding experienced people there is also the builder view. An experimental builder is a graphical interface with menus and, often, drag-and-drop like features.

Psychopy Builder View.
  • Save
Psychopy Builder

The builder view is one of the reasons, I have started to suggest students that I meet to use PsychoPy to build experiments for their projects and thesis’. Another reason is that Python as scripting language is also great because the cognitive science students at our department take at least 15 ECTS in Python programming. It might be worth mentioning that since Python is a popular programming language with a great and helpful online community (see Stackoverflow tags “#Python” and “#Psychopy“) .  Finally, because the students can install it on their on computers make it possible for the students to sit at home, in the library, or wherever they want, to complete their experiments.

Installing PsychoPy

If you are interested in installing it from Ubuntu you can add the Neuro Debian repository:

wget -O- 
sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkp:// 0xA5D32F012649A5A9

sudo apt-get update && sudo apt-get install psychopy

Another way to install it is to use Pip;

pip install psychopy

Note that you might need to install some dependencies (i.e., some other Python packages) to get it to run under Ubuntu (it may prove useful to check the post linked below).

If you are running Linux Mint Debian Edition (LMDE) you can try to use the instructions in an earlier post How to Install PsychoPy on LMDE.

PsychoPy Resources

There is, as far as I know, only one book that mentions and give an example of how to use PsychoPy: Computational Neuroscience and Cognitive Modelling: A Student’s Introduction to Methods and Procedures

  • Save
. If anyone that read this and know about other books please leave a comment with title and author name.

You can also take a look at an example script I have written: SART written in PsychoPy. Finally, here you will find some useful links to Python (and R) related resources: Python Resources.

Peirce, J. W. (2007). PsychoPy-Psychophysics software in Python. Journal of Neuroscience Methods, 162(1-2), 8–13. Retrieved from


  1. Jonathan Peirce

    Actually, there are more books now, and with more depth than the one you link to

    – “Building Experiments in PsychoPy” by Peirce and MacAskill is the most in-depth covering the Builder interface.
    – “Programming Visual Illusions for Everyone” by Marco Bertamimi is great, fun way to learn how to use PsychoPy stimuli from Python code.
    – “Python for Experimental Psychologists” shows you how to create experiments in either PsychoPy or PyGaze, although it’s written using Python2 syntax which I wouldn’t recommend now (not fully compatible with Python3).

    • Hey Jonathan,

      Yes! I actually own “Building Experiments in PsychoPy” but I have to find time to read it. I’ll update this post, with these books, during the weekend.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link