Is it possible to run an eyetracking experiment in python 3.x? I’ve seen pylink/ pylinkwrapper, and got it somewhat working in py2.7, but have generally switched over to py3.x. I know pylink itself is still a python 2.x package - does that prevent psychopy3 from being able to successfully interface with eyelink? ioHub doesn’t make reference to this specific limitation, though I’ve found it difficult figuring out how ioHub works from the documentation.
Just to report that we have been successful in making a set of experiments using python 3 + psychopy + eyelink1000 and only that libraries. This was installed on a MacOs machine with a dual LED display (one for control, one in the setup room). This involved the use of different parts of code found in the pylink wrapper but also thanks to the excellent work of the pygaze team (in particular the edfreader.py script).
How did you import pylink and which pylink version did you use for it to work in python 3?
When running
import pylink as pl
in either PsychoPy2PY3 or PsychoPy3 (Python 3) I receive the error message:
ModuleNotFoundError: No module named ‘pylink’
I also tried to paste the pylink folder into ‘C:\Program Files (x86)\PsychoPy3\Lib\site-packages’, but then I receive the error:
bad magic number in ‘pylink’: b’l\x0c\r\n’
I also tried to add the pylink folder to the paths (under Preferences), but then I get:
DLL load failed: %1 is not a valid Win32 application.
I am using a Windows PC and with Python 2.7 the pylink import worked just fine.
I have no experience with windows boxes. The import just works using a MacOs with the provided executables… See the screenshot with a minimal import. Do you have any to use a different OS, like a dual boot on your windows box?
Thanks for your reply!
Unfortunately using a different OS in that setup would not be easy right now.
I have contacted SR research now, as I have found out that they have not released any official pylink versions for Python 3.6 (at least not for Windows), but have some internal builds.
Hopefully my script runs with that, I will have to see.
Hi laurent.perrinet! thanks for this code, it is amazing. I’m wondering (since this was a few years ago) what version of python 3.X were you using? I think pylink has a 3.4 but I’m not sure if that’s still in beta / you were able to have it work. thanks for any tips!