element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Make Life Accessible
  • Challenges & Projects
  • Design Challenges
  • Make Life Accessible
  • More
  • Cancel
Make Life Accessible
Blog EyePrints - Post 4 - Installing Pygaze
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: amgalbu
  • Date Created: 30 Apr 2016 6:59 AM Date Created
  • Views 739 views
  • Likes 1 like
  • Comments 1 comment
  • makelifeaccessible
  • python
  • eyeliner
  • opencv
  • eye_tracking
  • eyeprints
  • accessibility_projects
  • make_life_accessible
Related
Recommended

EyePrints - Post 4 - Installing Pygaze

amgalbu
amgalbu
30 Apr 2016

Previous posts

EyePrints - Post 1 - Introduction

EyePrints - Post 2 - Installing OpenCV - Prerequisites

EyeLiner - Post 3 - Installing OpenCV

 

PyGaze is an open-source toolbox for eye tracking in Python.

 

Pygaze is an open-source toolbox for eye tracking in Pyton.

To install PyGaze, let's first install some dependencies. Type the following into the terminal.

 

sudo apt-get install python-numpy python-scipy python-matplotlib python-imaging python-pygame psychopy python-pyglet

 

This will install (in order): NumPy, SciPy, Matplotlib, PIL, PyGame, PsychoPy, and pyglet. Probably some of these packages have been already installed, but let's do it again to stay om the safe side

 

Site-Packages Directory

Installing PyGaze requires copying the PyGaze directory into Python’s site-packages directory. First check where this directory is located. One way to do this is with Python. In the terminal, type:

 

python

 

To check the site-packages directory, type the following in the Python console:

 

>>> import site; site.getsitepackages()

 

This will list your site-packages directory. One of the directories I see listed is:

 

/usr/local/lib/python2.7/dist-packages/

 

Exit the Python console by typing:

 

>>> quit()

Install PyGaze

In order to install PyGaze, download the latest version of pygaze from github

 

$ wget https://github.com/esdalmaijer/PyGaze/archive/master.zip

 

Go to the directory where the download was saved (for me, cd ~). To unzip PyGaze, in the terminal type:

 

unzip pygaze.zip

 

To copy the unzipped PyGaze directory into the site-packages directory, type the following in your terminal (of course, you should use the site-packages directory you got from above):

 

sudo cp -r pygaze /usr/local/lib/python2.7/dist-packages/

 

Set the permissions to drwxr-sr-x:

 

sudo chmod 2755 -R /usr/local/lib/python2.7/dist-packages/pygaze/

Testing

To test if everything is ok, I opened a python console and tried to import the pygaze module

 

$ python
>>> import pygaze

 

I got no errors, so everythink should be ok

 

Getting Started With PyGaze

In the zip file we just downloaded, there are several example experiments located in the directory pygaze/examples/. Unfortunately they do not run with a webcam, but requires a commercial eyetracker (currently EyeLink 1000, SMI RED and Tobii TX300 are supported). A dummy eyetracker is supported: the eye movements can be simulated using the mouse to test the experiments you are devising.

So for the moment, I was oly able to run the project in the show_webcam folder, that simply shows the output of the webcam

 

image

  • Sign in to reply
  • DAB
    DAB over 9 years ago

    Interesting.

     

    I look forward to seeing how responsive the software will be as you integrate the various packages.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube