From TSG Doc
Revision as of 15:03, 21 January 2021 by H.voogd (talk | contribs)
Jump to navigation Jump to search
Installed version2.7.9
Development statusActive
Written inPython

Python is a general-purpose, high-level programming language. It is also a type of snake and it is also a rollercoaster, but one is arguably more relevant to your research than the others.

Python on the labcomputers Since Python version 2.7 has reached end of life since January first 2020, this version is no longer installed on the PCs in the labs. Standard is now: Python 3.7 64-bits. If you still have scripts written in Python2, the scripts should be upgraded to Python 3. Most changes are probably the print statements. Print statements should always have parentheses: print('some text') Key differences between Python 2 and Python 3 are here:

Psychopy 2020.2.10 has been installed in the root of the Python3.7 64-bit version. This is also the default version when 'psychopy' is typed from the command prompt. It is also the default that opens when a .py file is double-clicked. It also can be started by clicking the appropriate icon on the desktop. There is also a Psychopy 2020.2.10 installed on Python3.6 32-bits. This version has its own icon on the desktop and should be used when you are using a TOBII Eyetracker.

When your script fails to load in Psychopy, because you need packages that are not installed on our labcomputers, please contact TSG.

On the labcomputer, there is support for Spyder, PyCharm and Psychopy.

The information below is outdated


Windows (32 bit)

  1. Download the Win32 installer
  2. Double-click on the executable and follow the steps on your screen.


Windows Environment Variables

Computer --> Properties --> Advanced settings --> Environment Variables.

Python env.jpg

Add the following Path:


Python path.jpg

Python path2.jpg

Package Management


After Python is installed, you can use pip to install your required packages. pip is included with Python 2.7.9 or greater. For older versions, use the following steps to install:

  1. Download
  2. Execute get-pip by entering the following command: python

To install a package, simply execute the following command: c:\pip install PACKAGE_NAME
Replace PACKAGE_NAME with the name of the package of choice.

Note: By default, packages are installed in the following folder (Windows):


This location may differ if you have installed Python somewhere else.


For package management with setuptools, install setuptools using the following command: pip install -U setuptools

To install a package, simply execute the following command: c:\easy_install PACKAGE_NAME
Replace PACKAGE_NAME with the name of the package of choice.

List of Python Packages

Python Library Description Installed Installer Type URL
PIL Python Image Library Yes Package Manager
SciPy Python-based ecosystem of open-source software for mathematics, science, and engineering. Yes Package Manager
PyWin32 Python Extensions for Windows Yes Windows Installer
PySerial Serial access for Python Yes Windows Installer
wxPython GUI Toolkit for Python Yes Windows Installer
matplotlib 2D plotting library for Python Yes Windows Installer
pyo dedicated Python module for digital signal processing Yes Windows Installer
Opencv2 Open Source Computer Vision is a library of programming functions mainly aimed at real-time computer vision Yes Windows Installer
PyQt Python binding of the cross-platform GUI toolkit Qt Yes Windows Installer
PyQtGraph Scientific Graphics and GUI Library for Python Yes Windows Installer
LXML library for processing XML and HTML in the Python language Yes Package Manager
PyGame Pygame is a set of Python modules designed for writing games. Yes Windows installer
PANDAS Python Data Analysis Library Yes Package Manager
Expyriment A Python library for congnitive and neuroscientific experiments. Yes Package Manager
Pyparse Parse text files in an easier and more maintainable manner Yes Package Manager
AVbin media decoding/decompression library Yes Windows Installer
Pyglet a cross-platform windowing and multimedia library for Python. Yes Manual Install
FreeType Library to Render Fonts Yes Manual Install
Psychopy Psychology Software in Python Yes Package Manager

For Psychopy dependancies, check the Psychopy page.

Windows Handlers

Check the Handlers by opening the Windows registry editor.

Windows Registry Editor Version 5.00
@="\"C:\\Python27\\python.exe\" \"%1\" %*"

Windows Registry Editor Version 5.00
@="\"C:\\Python27\\python.exe\" \"%1\" %*"

Windows Registry Editor Version 5.00
@="\"C:\\Python27\\python.exe\" \"%1\" %*"

Windows Registry Editor Version 5.00
@="\"C:\\Python27\\python.exe\" \"%1\" %*"

Python DLL Files

  • C:\Python27\DLLs\
  • Path Within the script.
  • C:\Windows\System32 or
  • C:\Windows\SysWOW64



Execute the following script within the commandline (CMD): python a.
You should see the following result:

number of argument:  2
 argv[0]: ./
 argv[1]: a

See Also

External Links