Installing PyGaze on Mac OS X
This question was asked via the contact form on the PyGaze website. Because of it's benefit to others, here is the answer to How do I install PyGaze on OS X?
Sorry to hear about the struggle! I'm not a Mac user myself (Linux and Windows only), and I am not familiar with iTerm. However, I do know OS X usually comes with one or more pre-installed (and heavily modified) versions of Python, which are sometimes erroneously picked up by the terminal and code editors. It's a good idea to check which version of Python your are running, and to check whether this is the one you have installed PyGaze and its dependencies in. Please note that most of PyGaze's dependencies only work or work best on the 32-bit version of Python 2.7, so that is most likely the version you would want to install.
If you haven't downloaded Python yet, I;'d recommend trying Anaconda, which is a Python distribution that comes pre-packaged with PIL, NumPy, SciPy, Matplotlib and a whole lot of other useful stuff. Its website says there should be a Mac version. You can find it here: https://store.continuum.io/cshop/anaconda/.
Additionally, you will have to install PyGame and PsychoPy, and their dependencies. For Mac, use the following links:
Pyglet (PsychoPy dependency): http://pyglet.googlecode.com/files/pyglet-1.1.4.dmg
Installing PyGame and Pyglet is very easy: simply run the installers. To install PsychoPy, unzip the folder and copy it to Python's site-packages directory. Then run the following, using a terminal:
python "path/to/file/setup.py" install
(Again, take care that your preferred installation of Python is used for this! Should be Anavonda, Python 2.7, 32-bit!)
Finally, to install PyGaze, download the latest package from GitHub: https://github.com/esdalmaijer/PyGaze/archive/master.zip. Unzip the archive, and (very important), copy the 'resources' folder into the 'pygaze' folder. Then copy the pygaze folder to the site-packages directory of your Python installation.
FYI: there is a webpage on the website: http://www.pygaze.org/installation/. However, I agree that installing a fully functional Python is a huge hassle, and can take quite a bit of time (especially on Macs, which are quite unfriendly to developers that do not tailor specifically to OS X). It's a lot easier on Linux, but that OS comes with its own problems. Additionally, there is a WinPython package for Windows that should work out of the box with PyGaze and all of its dependencies installed.
We haven't gone over how to install the package for your eye tracker of choice yet, but if you can tell me which brand you will be using, I should be able to point you in the right direction.
Hi thank you for this post! I downloaded a Mac OS version Opensesame and it looks like it comes with a pre-installed pygaze package. It has initialize, start recording, stop recording and three other plugins and the calibration part works in my experiment. Although I have put pygaze logger and data logger at the end of my experiment, there is no eye-tracking data recorded in the log file. My experiment is simply a two-player game and I want to see where they look to during the experiment. The eye tracker I am using are SMI and Eye-Tribe. I tried everything in this post but when I run python "path/to/file/setup.py" install it says python: can't open file 'path/to/file/setup.pyinstall': [Errno 2] No such file or directory. I also have pygaze downloaded and copied open sesame-plugins folders from pygaze to opensesame. I have copied the pygaze folder to the contents of python2.7. I have looked into other discussions but they seem to have no trouble getting data whatsoever so I am really stuck by where my problem comes from.
I am looking for coordinates of the eye movement during the experiment but it would also be really helpful if you could recommend a software that could translate coordinates into graphic data.
Is the only problem that no eye data is written to file, or does non of the eyetracking work? I suppose, you selected the corrected eyetracker in
Do find out whether you can actually access the eyetracker, try to do something like following in an
Can you run the command and let us know what you see.