<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PyGaze</title>
	<atom:link href="https://www.pygaze.org/tag/guide/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.pygaze.org</link>
	<description>Open source eye-tracking software and more.</description>
	<lastBuildDate>Sun, 21 Feb 2021 22:21:08 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>PyGaze installation on Debian 8 &#8220;Jessie&#8221;</title>
		<link>https://www.pygaze.org/2015/10/pygaze-installation-on-debian-8-jessie/</link>
		<comments>https://www.pygaze.org/2015/10/pygaze-installation-on-debian-8-jessie/#comments</comments>
		<pubDate>Wed, 21 Oct 2015 12:19:56 +0000</pubDate>
		<dc:creator><![CDATA[Joseph P. DeVeaugh-Geiss]]></dc:creator>
				<category><![CDATA[eye tracking]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.pygaze.org/?p=276</guid>
		<description><![CDATA[This guide will teach you how to install PyGaze and its dependencies on Linux. The guide is written for Debian 8, but the same steps are highly to work on other Linux distributions too.<p> <a class="continue-reading-link" href="https://www.pygaze.org/2015/10/pygaze-installation-on-debian-8-jessie/">Continue reading<i class="icon-right-dir"></i></a></p>]]></description>
				<content:encoded><![CDATA[<h3>TL;DR</h3>
<p>This guide will teach you how to install PyGaze and its dependencies on Linux; specifically Debian 8, but it is highly compatible with other Linux distributions too. It is also available to <a href="http://www.pygaze.org/resources/downloads/DeVeaugh-Geiss_pygaze_installation_debian.pdf">download as a PDF</a>.
</p>
<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1. Introduction</a></li>
<li><a href="#sec-2">2. Prerequisites</a>
<ul>
<li><a href="#sec-2-1">2.1. Free Software</a></li>
<li><a href="#sec-2-2">2.2. Non-Free/Restricted Software</a>
<ul>
<li><a href="#sec-2-2-1">2.2.1. Registering For SR Research Support Forum</a></li>
<li><a href="#sec-2-2-2">2.2.2. Installing pylink</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#sec-3">3. PyGaze Installation</a>
<ul>
<li><a href="#sec-3-1">3.1. Site-Packages Directory</a></li>
<li><a href="#sec-3-2">3.2. Install PyGaze</a></li>
<li><a href="#sec-3-3">3.3. Testing</a></li>
</ul>
</li>
<li><a href="#sec-4">4. Getting Started With PyGaze</a>
<ul>
<li><a href="#sec-4-1">4.1. Potential Problems</a></li>
</ul>
</li>
<li><a href="#sec-5">5. PyGaze Community</a>
<ul>
<li><a href="#sec-5-1">5.1. Forum</a></li>
<li><a href="#sec-5-2">5.2. Share Your Experiments</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Introduction</h2>
<div class="outline-text-2" id="text-1">
<p>
General information is available at <a href="http://www.pygaze.org/">http://www.pygaze.org/</a>.
</p>
<ul class="org-ul">
<li>Operating System for these instructions: GNU/Linux Debian 8 &#8220;Jessie&#8221;
<ul class="org-ul">
<li>Note that these instruction will likely work on any Debian derivative (Linux Mint, Ubuntu, etc.).
</li>
</ul>
</li>
<li>I assume here that the user is comfortable with basic terminal commands (cd, cp, etc.) and is somewhat familiar with the directory system of GNU/Linux.
</li>
<li>Python 2.7.9 is pre-installed
</li>
</ul>
</div>
</div>
<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2"><span class="section-number-2">2</span> Prerequisites</h2>
<div class="outline-text-2" id="text-2">
<p>
For more information on Python prerequisites, see <a href="http://www.pygaze.org/installation/">http://www.pygaze.org/installation/</a>.
</p>
</div>
<div id="outline-container-sec-2-1" class="outline-3">
<h3 id="sec-2-1"><span class="section-number-3">2.1</span> Free Software</h3>
<div class="outline-text-3" id="text-2-1">
<p>
Type the following into the terminal. This will install (in order): NumPy, SciPy, Matplotlib, PIL, PyGame, PsychoPy, and pyglet:
</p>
<p>
<code>sudo apt-get install python-numpy python-scipy python-matplotlib python-imaging python-pygame psychopy python-pyglet</code>
</p>
</div>
</div>
<div id="outline-container-sec-2-2" class="outline-3">
<h3 id="sec-2-2"><span class="section-number-3">2.2</span> Non-Free/Restricted Software</h3>
<div class="outline-text-3" id="text-2-2">
<p>
The instructions on the PyGaze website provide information about three additional programs, all of which are non-free or restricted software. In <a href="http://www.ling.uni-potsdam.de/~vasishth/">Shravan Vasishth</a>&#8216;s Eyetracking Lab they are using an Eyelink 1000 (1000Hz) eyetracker manufactured by SR Research (desktop mount camera system). They do not use SMI or Tobii eye-trackers. For this reason I will only install pylink here.
</p>
<ul class="org-ul">
<li>pylink: proprietary library created by SR Research, requires registering with the SR Research support forum; see Section <a href="register-sr">2.2.1</a> below. Once registered, you can download and install pylink; see Section <a href="install-pylink">2.2.2</a> below.
</li>
<li>PyViewX API: for communication with eye trackers manufactured by SensoMotoric Instruments (SMI), must request a download, provide some personal details, and wait for an e-mail with a download link.
</li>
<li>Tobii: for Tobii eye trackers via Tobii&#8217;s own Python bindings, based on Hiroyuki Sogo&#8217;s (Ehime University) script.
</li>
</ul>
</div>
<div id="outline-container-sec-2-2-1" class="outline-4">
<h4 id="sec-2-2-1"><span class="section-number-4">2.2.1</span> <a id="sec:register-sr" name="sec:register-sr"></a> Registering For SR Research Support Forum</h4>
<div class="outline-text-4" id="text-2-2-1">
<p>
In order to download pylink, you have to register with the SR Research support at this link <a href="https://www.sr-support.com/forum.php">https://www.sr-support.com/forum.php</a>. You are required to provide the following information:
</p>
<ul class="org-ul">
<li>a user name and password
</li>
<li>email address
</li>
<li>institute, location, EyeLink system
</li>
</ul>
<p>
You must accept the rules for the forum. After registering you will be sent a confirmation email. Open the link in your browser and then wait for approval of your account.
</p>
</div>
</div>
<div id="outline-container-sec-2-2-2" class="outline-4">
<h4 id="sec-2-2-2"><span class="section-number-4">2.2.2</span> <a id="sec:install-pylink" name="sec:install-pylink"></a> Installing pylink</h4>
<div class="outline-text-4" id="text-2-2-2">
<p>
After registering with SR Research support forum, log in so you may download the tar.gz file from here: <a href="https://www.sr-support.com/attachment.php?attachmentid=1106&amp;d=1295295193">https://www.sr-support.com/attachment.php?attachmentid=1106&amp;d=1295295193</a>.
</p>
<p>
Go to the directory where the download was saved (for me, <i>cd ~/Downloads/</i>) and unpack the tar.gz in the terminal with this command:
</p>
<p>
<code>tar -xvzf pylink4python2.7_linux_x32.tar.gz</code>
</p>
<p>
Go into the unpacked folder &#8220;pylink4python2.7&#8243;:
</p>
<p>
<code>cd pylink4python2.7</code>
</p>
<p>
Here you can copy the folder pylink2.7 to the folder <code>/usr/lib/pymodules/</code> renaming it to pylink in the process:
</p>
<p>
<code>sudo cp -r pylink2.7 /usr/lib/pymodules/pylink</code>
</p>
</div>
</div>
</div>
</div>
<div id="outline-container-sec-3" class="outline-2">
<h2 id="sec-3"><span class="section-number-2">3</span> PyGaze Installation</h2>
<div class="outline-text-2" id="text-3">
<p>
For more information on PyGaze installation, see <a href="http://www.pygaze.org/downloads/">http://www.pygaze.org/downloads/</a>.
</p>
</div>
<div id="outline-container-sec-3-1" class="outline-3">
<h3 id="sec-3-1"><span class="section-number-3">3.1</span> Site-Packages Directory</h3>
<div class="outline-text-3" id="text-3-1">
<p>
Installing PyGaze requires copying the PyGaze directory into Python&#8217;s site-packages directory. First check where this directory is located. One way to do this is with Python. In the terminal, type:
</p>
<p>
<code>python</code>
</p>
<p>
To check the site-packages directory, type the following in the Python console:
</p>
<p>
<code>import site; site.getsitepackages()</code>
</p>
<p>
This will list your site-packages directory. One of the directories I see listed is:
</p>
<p>
<code>/usr/local/lib/python2.7/dist-packages/</code>
</p>
<p>
Remember this path. Exit the Python console by typing:
</p>
<p>
<code>quit()</code>
</p>
</div>
</div>
<div id="outline-container-sec-3-2" class="outline-3">
<h3 id="sec-3-2"><span class="section-number-3">3.2</span> Install PyGaze</h3>
<div class="outline-text-3" id="text-3-2">
<p>
In order to install PyGaze, download the zip file from here: <a href="http://www.pygaze.org/downloads/">http://www.pygaze.org/downloads/</a>. Go to the directory where the download was saved (for me, <i>cd ~/Downloads/</i>). To unzip PyGaze, in the terminal type:
</p>
<p>
<code>unzip pygaze.zip</code>
</p>
<p>
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):
</p>
<p>
<code>sudo cp -r pygaze /usr/local/lib/python2.7/dist-packages/</code>
</p>
<p>
Set the permissions to drwxr-sr-x:
</p>
<p>
<code>sudo chmod 2755 -R /usr/local/lib/python2.7/dist-packages/pygaze/</code>
</p>
</div>
</div>
<div id="outline-container-sec-3-3" class="outline-3">
<h3 id="sec-3-3"><span class="section-number-3">3.3</span> Testing</h3>
<div class="outline-text-3" id="text-3-3">
<p>
Test if successful. Type <code>python</code> into the terminal and in the Python console type: <code>import pygaze</code> If you do not get an error message, you have successfully installed PyGaze.
</p>
</div>
</div>
</div>
<div id="outline-container-sec-4" class="outline-2">
<h2 id="sec-4"><span class="section-number-2">4</span> Getting Started With PyGaze</h2>
<div class="outline-text-2" id="text-4">
<p>
There are several example experiments located by default in the directory <i>pygaze/examples/</i>. The PyGaze developers also provide many examples on their website. One that they recommend to start with is the &#8220;Simple Tracker Experiment&#8221;, which can be downloaded here: <a href="http://www.pygaze.org/resources/examples/simple_tracker_experiment.zip">http://www.pygaze.org/resources/examples/simple_tracker_experiment.zip</a>.
</p>
<p>
Unzip, enter the unzipped directory, and let the fun begin by typing <code>python simple_tracker_experiment.py</code> in the terminal.
</p>
</div>
<div id="outline-container-sec-4-1" class="outline-3">
<h3 id="sec-4-1"><span class="section-number-3">4.1</span> Potential Problems</h3>
<div class="outline-text-3" id="text-4-1">
<p>
When first running <i>simple_tracker_experiment.py</i> I encountered the following error:
</p>
<p>
<code>pygame.error: No video mode large enough for 1920x1080</code>
</p>
<p>
This is because pygame is trying to use the wrong screen size for my laptop. I was able to fix this by changing the screen size in <i>constants.py</i> (located in the same directory as <i>simple_tracker_experiment.py</i>) to my screen size (1600, 900) at the following line:
</p>
<p>
<code>DISPSIZE = (1600,900) # canvas size</code>
</p>
</div>
</div>
</div>
<div id="outline-container-sec-5" class="outline-2">
<h2 id="sec-5"><span class="section-number-2">5</span> PyGaze Community</h2>
<div class="outline-text-2" id="text-5">
</div>
<div id="outline-container-sec-5-1" class="outline-3">
<h3 id="sec-5-1"><span class="section-number-3">5.1</span> Forum</h3>
<div class="outline-text-3" id="text-5-1">
<p>
Be in touch with other PyGaze users at the forum: <a href="http://forum.cogsci.nl/index.php?p=/categories/pygaze">http://forum.cogsci.nl/index.php?p=/categories/pygaze</a>. This is a great place to get help from the larger scientific community as well as to help others when you can.
</p>
</div>
</div>
<div id="outline-container-sec-5-2" class="outline-3">
<h3 id="sec-5-2"><span class="section-number-3">5.2</span> Share Your Experiments</h3>
<div class="outline-text-3" id="text-5-2">
<p>
If you write some great experiments, PyGaze encourages you to share them with the scientific community via their website. To do so you should contact them via their contact form here: <a href="http://www.pygaze.org/contact/#contactform">http://www.pygaze.org/contact/#contactform</a>.
</p>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>https://www.pygaze.org/2015/10/pygaze-installation-on-debian-8-jessie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
