Now Shipping! – The EyeLink 3; combined head and eye tracking at up to 1000 Hz.

PyLink Installation Instructions
#1
The instructions here are intended for Python programmers using a global/system Python environments or Python virtual environments. If you are instead programming in PsychoPy or Open Sesame, or using Pygame for your experimental programming, then please see the following resources for installation instructions specific to those environments. Please note the EyeLink Developers Kit already includes libraries for Python 2.7 and 3.6–3.14. If you have already installed the EyeLink Developers Kit, many of the files mentioned below are already on your computer and simply need to be imported into your Python environment. See the Offline Installation section below for further details.




Online installation with Python 3.0 and above:
The easiest and quickest way to access the correct version of PyLink for your system is from our PyPi server (https://pypi.sr-support.com/) via the sr-research-pylink meta-package.

For all commands below replace the "x" with your specific Python subversion (e.g., if you are using Python 3.6, use py -3.6 for Windows or python3.6 for macOS/Ubuntu).

First, ensure you are using the latest version of pip prior to installation:
Code:
py -3.x -m pip install pip --upgrade

To install PyLink from the PyPi server, run the appropriate command below.
  • Windows:
    Code:
    py -3.x -m pip install sr-research-pylink
  • macOS / Ubuntu:
    Code:
    python3.x -m pip install sr-research-pylink


Offline installation:
If you prefer to install offline, first download and install the EyeLink Developers Kit. Then, use pip to install the appropriate .whl file packaged within the kit.

You can find the local wheels at the following default paths:
  • Windows - C:\Program Files (x86)\SR Research\EyeLink\SampleExperiments\Python\Offline_Install\
  • macOS - /Applications/EyeLink/SampleExperiments/Python/Offline_Install/

To install PyLink from a local .whl file, run the following code. Replace *.whl in the statement below with the full file path of the specific wheel file that matches your Python version and system architecture (e.g., sr_research_pylink-2.0.42917.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_x86_64.whl):
  • Windows:
    Code:
    py -3.x -m pip install *.whl
  • macOS / Ubuntu:
    Code:
    python3.x -m pip install *.whl


Testing your installation

To verify that PyLink is properly installed, run the following code in your Python shell:
Code:
import pylink
If no error message appears, the PyLink library is successfully installed. You can now test your environment by running one of the example templates described below.