Installation

Note

As of the May 8th, 2013 release of PsychoPy, the ioHub Package has merged with the PsychoPy package and is now being distributed as part of PsychoPy.

The documentation provided here is still up to date however the installation instructions below are only needed if you can not use the PsychoPy Python Distribution Installer provided for Windows or OS X. Please visit the PsychoPy website and follow the installation and download links to learn how to install one of these PsychoPy Python Distributions.

If you do need to perform a manual installation of PsychoPy and wish to also use the ioHub submodule within it, then the following manual installation instructions can still be of use.

There are different installation options depending on the target OS.

Windows

Manually Installing ioHub

The following software must be installed on the computer before proceeding with the ioHub dependency installation list and installation of ioHub itself:

  1. Python 2.6.8 or 2.7.3 32 bit is required as the Python interpreter. The 32 bit version of Python can be installed on a supported 64 bit OS.
  2. Psychopy 1.74.03 or higher and all of it’s dependencies. See the PsychoPy installation page for details.
  3. For the NumPy package, please ensure 1.6.2 or greater is installed.

Dependency Installation List

Once Python and PsychoPy (including all the stated PsychoPy dependencies) are installed, the following extra Python packages must be installed for the ioHub:

Python 2.7 Package List with URLs

  1. psutil A cross-platform process and system utilities module for Python
  2. msgpack It’s like JSON. but fast and small.
  3. greenlet The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called “tasklets”.
  4. gevent A coroutine-based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libevent event loop.
  5. numexpr Fast numerical array expression evaluator for Python and NumPy.
  6. pytables PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data.
  7. pyYAML PyYAML is a YAML parser and emitter for Python.
  8. pywin32 Python Extensions for Windows
  9. pyHook Python wrapper for global input hooks in Windows.

Python 2.6 Package List with URLs

  1. psutil A cross-platform process and system utilities module for Python
  2. msgpack It’s like JSON. but fast and small.
  3. greenlet The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called “tasklets”.
  4. gevent A coroutine-based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libevent event loop.
  5. numexpr Fast numerical array expression evaluator for Python and NumPy.
  6. pytables PyTables is a package for managing hierarchical data sets and designed to efficiently and easily cope with extremely large amounts of data.
  7. pyYAML PyYAML is a YAML parser and emitter for Python.
  8. pyHook Python wrapper for global input hooks in Windows.
  9. pywin32 Python Extensions for Windows

Several of the devices supported by ioHub require the installation of a binary OS driver for the device that can not be included with the ioHub package due to licensing considerations. Please refer to the documentation page for each device you will be using to ensure that any device specific driver required is known about and is installed.

ioHub Package Installation

ioHub is now included with the PsychoPy package. Please ensure the most recent version of PsychoPy is installed and ioHub is also then installed.

Linux

Manually Installing ioHub

The following software must be installed on the computer before proceeding with the ioHub dependency installation list and installation of ioHub itself:

  1. Python 2.6.8 or 2.7.3 32 bit is required as the Python interpreter. The 32 bit version of Python can be installed on a supported 64 bit OS.
  2. Psychopy 1.74.03 or higher and all of it’s dependencies. See the PsychoPy installation page for details.
  3. For the NumPy package, please ensure 1.6.2 or greater is installed.

ioHub Dependency List Installation

The following Python packages need to be installed on the system you plan to run ioHub on. Some packages can be installed using pip, while other should be installed by downloading the package from the provided URL, unpacking the tarball, and installing the package by typing:

> python setup.py install

in a terminal session where you have changed directories to the location of the uncompressed python package source that contains the setup.py script.

Some packages downloaded via a URL are a .deb file, in which case you just download the file and install it by double clicking the .deb file once downloaded.

Note that for both ‘pip’ and manual ‘python setup.py install’, depending on your Linux distribution and system configuration, you may need to run pip or ‘python setup.py install’ with root privileges by placing ‘sudo ‘ in front of the command line text to be run.

For example:

> sudo pip install package_name

where package_name is the name of one of the required python packages.

Installing pip if it is not Already on the System

If you type:

> pip

in a console and are told the program does not exist, then you can install pip using:

> sudo apt-get install pip

Packages To Download with URLs

  1. psutil A cross-platform process and system utilities module for Python
  2. gevent A coroutine-based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libevent event loop.
  3. numexpr Fast numerical array expression evaluator for Python and NumPy.
  4. pyYAML Following install instructions on the page. PyYAML is a YAML parser and emitter for Python. For faster processing, also download and install LibYAML; following install instructions on the page.
  5. python-xlib The Python X Library is a complete X11R6 client-side implementation, written in pure Python.

Packages to install using pip

  1. msgpack: It’s like JSON. but fast and small. ( pip install msgpack-python )
  2. greenlet: The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called “tasklets”. ( pip install greenlet )
  3. pytables: PyTables is a package for managing hierarchical data sets and designed to efficiently and easily cope with extremely large amounts of data. ( pip install tables )

ioHub Package Installation

ioHub is now included with the PsychoPy package. Please ensure the most recent version of PsychoPy is installed and ioHub is also then installed.

OSX 10.6 - 10.8

This is not suggested for the faint of heart. Instead you should strongly consider installing the PsychoPy Python Distribution for OS X discussed at the start of this page.

Manual Installation

The following software must be installed on the computer before proceeding with the ioHub dependency installation list and installation of ioHub itself:

  1. Python 2.6.8 or 2.7.3 32 bit is required as the Python interpreter. The 32 bit version of Python can be installed on a supported 64 bit OS.
  2. Psychopy 1.74.03 or higher and all of it’s dependencies. See the PsychoPy installation page for details.
  3. For the NumPy package, please ensure 1.6.2 or greater is installed.

Dependency List Installation

The following Python packages need to be installed on the system you plan to run ioHub on. Some packages can be installed using pip, while other should be installed by downloading the package from the provided URL, unpacking the tarball, and installing the package by typing:

> python setup.py install

in a terminal session where you have changed directories to the location of the uncompressed python package source that contains the setup.py script.

Note that for both ‘pip’ and manual ‘python setup.py install’, depending on your OS X settings and python configuration, you may need to run pip or ‘python setup.py install’ with root priveledges.

If your user has admin rights, this can be done by running the command with ‘sudo’ at the start of the command and entering your password when prompted. For example:

> sudo pip install package_name

where package_name is the name of one of the required python packages.

Installing pip if it is not Already on the System

If you type:

> pip

in a console and are told the program does not exist, then you can install pip or easy_install before proceeding.

Packages to install using pip or easy_install

  1. msgpack It’s like JSON. but fast and small. ( pip install msgpack-python )
  2. greenlet The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called “tasklets”. ( pip install greenlet )
  3. pytables PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data. ( pip install tables ). FIRST INSTALL ‘numexpr’ from the list below, as it is a dependency of tables)

Packages To Download

  1. pyobjc : A Python ObjectiveC binding.

  2. gevent: A coroutine-based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libevent event loop:

    pip install cython -e git://github.com/surfly/gevent.git@1.0rc2#egg=gevent
  3. numexpr Fast numerical array expression evaluator for Python and NumPy.

  4. pyYAML PyYAML is a YAML parser and emitter for Python. First install the C side package LibYAML, before installing ptYAML.

ioHub Package Installation

ioHub is now included with the PsychoPy package. Please ensure the most recent version of PsychoPy is installed and ioHub is also then installed.