3. Check your installation

3.1. Check Git

Download the course materials using Git by entering the following command line in a Terminal:

git clone https://github.com/chrplr/PCBS.git

You should see a message Cloning into 'PCBS'... and, if everything goes well, all the course materials (python scripts, data files, …) should be downloaded in a new subdirectory called PCBS, within the current working directory. You can cd into it and list its content:


Your Terminal window should more or less look like this:

Terminal showing the results of git clone...


If a folder named PCBS already exists in the current working directory, git will stop and will not download the content of the remote PCBS repository. In that case, you must delete or move the existing PCBS folder before running the git clone command above.

When you open a Terminal, the current working directory is your “home”, or “user”, directory, until you start navigating in the filesystem with the cd (change directory) command. If you are lost at this point, read Navigating the file system.

3.2. Check Python

This tests if Python3 is installed and correctly configured.

cd ~/PCBS/games
python human-guess-a-number.py
python matches.py


If you receive an error message such as bash: python: No such file or directory, and you are sure that python is installed, the most likely reason is that the problems lies with the PATH environment variable) listing all the directories: the directory containing the python executable file may be missing from the list. This happens for example, if you run the Anaconda3 installer and did not check the relevant box.

3.3. Check basic graphics

cd ~/PCBS/simulations/fractals
python koch0.py
python tree.py

3.4. Check matplotlib

matplotlib is a python library to create and display graphics.

cd ~/PCBS/stimuli/visual
python bullseye.py
python contrast_modulated_grating.py
python gabor.py
python image-manipulation.py
python wedgering.py

3.5. Check pygame

Pygame is a Python library to create simple audio visual games.

cd ~/PCBS/stimuli/visual-illusions/
python kanizsa_triangle.py
python hering.py
python extinction-rotated.py

3.6. Check Expyriment

Expyriment is a Python library for designing and conducting behavioural and neuroimaging experiments. Try to run the floowing three experiments (Note that the programs can be interrupted at any time by pressing the Esc key).

cd ~/PCBS/experiments/Posner-attention
python posner_task.py

cd ~/PCBS/experiments/parity_decision
python parity_feedback.py

cd ~/PCBS/experiments/mental_logic_card_game
python mental_logic_card_game.py

3.7. Sublime Text


This should open a new window with the sublime text editor. If you get a message command not found, ask the instructor to fix your PATH variable or try to do it by tourself 1.

Then, check out https://www.youtube.com/watch?v=SVkR1ZkNusI for a short tutorial.

3.9. Keep your local copy of the course material up to date

The course materials are often updated. To make sure you have the latest version, you can synchronize your local copy with the github repository http://github.com/chrplr/PCBS, with the commands:

cd ~/PCBS
git pull


  • if the PCBS directory is not in your home directory (-), you will need to use the appropriate path in the first cd command.

  • do not manually modify or create new files in the PCBS folder. If you do so, git will notice it and might prevent an automatic upgrade and ask you to ‘resolve conflicts’. If you get such a message, the simplest course of action, for beginners, is to delete the PCBS folder (or move it if you wnat to keep a copy of your modifications) and reissue the git clone command above to reload the full folder.)

3.10. Basic surviving skill: how to enter command lines in a Terminal

For the moment, you mostly need to know the following three commands:

  • ls: list the content of the current working directory

  • pwd: path of current working directory

  • cd: change directory

Read about them in http://linuxcommand.sourceforge.net/lc3_lts0020.php

Here are some resources to learn more about how to control your computer from a terminal:



Read https://linuxhint.com/path_in_bash/ , locate the folder containing subl, then use a text editor to add the following line at the end of the file ~/.bashrc:

export PATH="path_to_the_directory_containing_subl":"${PATH}"

Once this is done, type . ~/.bashrc and enter the command subl