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.
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:
To install PyLink from the PyPi server, run the appropriate command below.
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:
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):
Testing your installation
To verify that PyLink is properly installed, run the following code in your Python shell:
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.
- Getting Started with PsychoPy / EyeLink Integration
- Getting Started with OpenSesame
- Getting Started with Python and PyLink
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 --upgradeTo 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
