Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Pygaze example doesn't work.

edited September 2015 in PyGaze


I'm really interested in Pygaze, and try to use it in my eyelink studies.
Already installed all requirements in my Mac (OS Marvericks), according to the instructions.
I use Python 2.7.10, Eyelink1000plus.

"" didn't run, when I tried to confirm that operation.
The error was below.

Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygaze/examples/simple_tracker_experiment/", line 20, in
tracker = eyetracker.EyeTracker(disp)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygaze/", line 56, in init
from libeyelink import libeyelink
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygaze/", line 37, in
import Image
ImportError: No module named Image
Process finished with exit code 1

What should I do?

Sorry for my beginner skill, but I appreciate for your help.


  • edited 4:35PM


    No Mac user here, so here are just some guesses.
    Did you select the Eyelink in the pygaze_init module? ("select tracker type" is on "simple dummy" by default). If it still doesn't work when set to Eyelink, you can also try to set it to "advanced dummy" (where your mouse substitutes for the eyetracker input). If that works, then at least you can be sure the problem is due to the eyetracker setup.



  • edited 4:35PM

    Hi guys,

    I think @Josh misunderstood the question a bit, as he is referring to the OpenSesame plug-in. From your question, I seem to make out you are trying to run an example Python script, correct?

    To be honest, Mac is always a bit of an issue. I have little experience with the platform, and although I'm used to Linux (which is also UNIX), sometimes the two correspond way too little for me to make any kind of intelligent argument. That said, let's try to get you sorted.

    The traceback you posted indicates that the error occurs when PyGaze tries to import Image, which is the Python Image Library (or PIL, for short). It could well be you forgot to install this, as it is only one of the many dependencies.

    On the PyGaze website's installation page, there's a link to one PIL installer, that seems to have last been updated for Python 2.5. Note that this might not work on Python 2.7.

    Alternatively, you could download and install the source package by following the instructions on good ol' StackOverflow. This requires you to open a Terminal, and run the following commands:

    # download
    curl -O -L
    # extract
    tar -xzf Imaging-1.1.7.tar.gz
    cd Imaging-1.1.7
    # build and install
    python build
    sudo python install
    # or install it for just you without requiring admin permissions:
    # python install --user

    After doing this, running the example shouldn't give you the same error, because Imaging can then be imported. There might be further issues, though! For example, are you aware that you're trying to run the example script with an EyeLink attached? (It's not set to dummy mode.) This is fine, as long as you've installed the EyeLink software, including the pylink Python library.

    Good luck with the process! (And sorry it's such a hassle to install: welcome to Python on Mac...)


  • rrrrrr
    edited 4:35PM

    Thank you for your prompt reply.

    As I said, I already installed PIL.
    To confirm it, when I re-tried to install it (this install way is by Macports), the Terminal said below.

    $ sudo port install py27-pil
    ---> Computing dependencies for py27-pil
    ---> Activating py27-pil @1.1.7_7
    Error: org.macports.activate for port py27-pil returned: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/ already exists and does not belong to a registered port. Unable to activate port py27-pil. Use 'port -f activate py27-pil' to force the activation.
    Please see the log file for port py27-pil for details:
    To report a bug, follow the instructions in the guide:
    Error: Processing of port py27-pil failed

    You can see PIL already exists.

    Other library which I use for my experiment and image processing using PIL works well.

    Sorry to bother you, but I appreciate for your help.

  • rrrrrr
    edited 4:35PM


    I modified my " ImportError: No module named Image " by forcing activation of PIL according to error messages on terminal.

    However, another error happened as below.

    Traceback (most recent call last):
    File "/Users/ryotachibana/Desktop/PyGaze-master/examples/simple_tracker_experiment/", line 25, in
    tracker = eyetracker.EyeTracker(disp)
    "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygaze/", line 56, in init
    from libeyelink import libeyelink
    "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygaze/", line 38, in
    custom_display = pylink.EyeLinkCustomDisplay
    AttributeError: 'module' object has no attribute 'EyeLinkCustomDisplay'
    Process finished with exit code 1

    How do I correct it?

  • rrrrrr
    edited September 2015


    Thank you for your advise.
    I have good news.

    I succeeded to use Pygaze in Mac.

    I found that we should install the EyeLink Developer's Kit (
    This will be installed in '/Application/'.

    We can chose the suitable version of pylink for our Python (e.g. pylink2.7) from '/Application/Eyelink/pylink/'.
    After the choice, we should copy it to the directory we usually use (in my case, opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7).
    Don't forget to rename it from 'pylink2.7' to 'pylink', and create the path between your Python and the directory includes pylink.

    This works well!

    I hope for your information.

  • edited 4:35PM

    This is great news, thanks for sharing your solution!

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games