Problems running Pygaze
Hi.
I'm on a Mac, and I'm trying to use the eye-tracker template supplied with OpenSesame (with and EyeTribe eye tracker). I keep getting the error "ImportError: No module named pygaze_drift_correct".
I can confirm that pygaze_drift_correct.py is currently installed to my plugins folder (/Applications/OpenSesame.app/Contents/Resources/plugins/opensesame_plugins). I can also confirm that the pygaze folder (downloaded from https://github.com/esdalmaijer/PyGaze) is in my Python folder (/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/)
Any help greatly appreciated.
Comments
Hi Nick,
which version of OpenSesame are you using?
Hi
I've just downloaded the latest version (and added PyGaze to the Python path). Now it seems to find PyGaze. But it doesn't find Numpy.
What I'm really confused about is how to integrate Open Sesame with Python. Macs come with a native python (2.6 and 2.7) but this is quite difficult to update. Moreover, the Pygaze website recommends Enthought python (2.7, 32 bit). So I downloaded Enthought python and installed all the relevant packages using the Enthought package manager, including Numpy. This is the default version of python as it starts when when I type "python" in the shell. However, OpenSesame seems to be using the native python.
Is there a way to instruct OpenSesame to use a particular version of Python? Or do I need to install OpenSesame via python in order to achieve this?
Many thanks
Nick
Hi Nick,
The official OpenSesame packages for Windows and Mac OS come with their own Python environment, which is completely separate from any other Python environments that you might have on your system. So you need to update PyGaze within OpenSesame's environment, which is located within the app. How this works exactly depends on which version of OpenSesame you're using, hence @dschreij's question--which you didn't answer!
You can also install OpenSesame as a package into an existing Python environment:
See also:
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Sorry, I'd mentioned that it was the latest version, but hadn't supplied the version number. It's 3.1.0 Jazzy James.
Do you know how I can add packages to the open sesame python environment? By the debug window?
Thanks
Nick
Hi Nick,
yes that is certainly possible! Check this page on the documentation site: http://osdoc.cogsci.nl/3.1/manual/environment/.
Basically, you should be able to execute this command from OpenSesame's debug window:
You probably also need to append the "--upgrade" flag as an extra list item for these commands as you already have previous versions of these packages installed.
That's indeed how you can upgrade packages in OpenSesame. There's no updated version for
python-pygazeyet though, because we're still working out some kinks with EyeTribe calibration, as discussed here. Once these have been resolved, I'll push an update topython-pygaze.Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks. This is really helpful.
Nick
I just updated PyGaze to 0.6.0a16, which includes the fixes for calibration with the EyeTribe. You can upgrade by running the following in the debug window (so it's actually slightly different from @dschreij's post):
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi. I can confirm that the EyeTribe tracker is now working perfectly with the latest version of Open Sesame (Jazzy James). Thanks for help.