.. _install_mac: Install GazeParser (Mac OS X) ================================== .. warning:: From 0.7.0, SimpleGazeTracker does not officially support MacOS X. GazeParser will continue to support MacOS X. Dependencies ------------------------- **Python 3.6** or later is necessary to use GazePaser. GazeParser depends on following Python modules. - **numpy** - **scipy** - **matplotlib** - **PIL (Python Imaging Library)** - **wxPython** (for data viewer) - **PsychoPy** (experimental control library) .. note:: * VisionEgg backend is no longer supported by 0.11.0 or later. Download --------------------------- GazeParser installer can be downloaded from following page. ``_ Download following source archive to computers which you plan to use stimulus presentation and data analysis. Expand the archive and run 'python setup.py install'. - `GazeParser-0.12.0.zip `_ .. note:: If you want to use GazeParser.TrackingTools with **Standalone PyschoPy**, you have to download zip version of GazeParser. Expand zip file and copy a directory named 'GazeParser' to 'site-packages' of Standalone Psychopy installation directory. You may have to install **ImageFont** and **ImageDraw** modules from **PIL** in a similar way. .. Build SimpleGazeTracker (Mac OS X Lion) ----------------------------------------------- Install Xcode and command line tools in advance. Following tools and libraries are necessary to build SimpleGazeracker. - pkg-config - cmake - ffmpeg - OpenCV - SDL2 - SDL2_net - SDL2_ttf In a testing environment, pkg-config was installed via macports. Binary distribution of cmake was used. Other libraries were built from source in the following order. 1. SDL2 2. SDL2_net 3. SDL2_ttf 4. ffmpeg 5. OpenCV .. warning:: By default, current version of SDL_net is built without TCP_NODELAY option in Mac OS X. This **severely spoil performance of SimpleGazeTraqcker**. To build SDL_net with TCP_NODELAY option, edit SDLnetsys.h to force to include netinet/tcp.h. As to SDL_net-1.2.8, delete following highlighted lines in SDLnetsys.h to include netinet/tcp.h in Mac OS X. .. code-block:: c :emphasize-lines: 4,6 #ifndef __BEOS__ #include #endif #ifdef linux /* FIXME: what other platforms have this? */ #include #endif #include #include Don't forget enable **ffmpeg** when configuring OpenCV. If you want to use IEEE1394 camera, enable **dc1394**. Now you are ready to build SimpleGazeTracker. Expand gzipped tarball and change working directory to the created directory. .. code-block:: bash ~$ tar zxvf SimpleGazeTracker-x.x.x.tar.gz ~$ cd SimpleGazeTracker-x.x.x Execute 'configure' script. .. code-block:: bash ~/SimpleGazeTracker-x.x.x$ ./configure If 'configure' script finish successfully, build and install SimpleGazeTracker. .. code-block:: bash ~/SimpleGazeTracker-x.x.x$ make ~/SimpleGazeTracker-x.x.x$ sudo make install By default, simplegazetracker is installed at /usr/local/simplegazetracker. Type as following to comfirm SimpleGazeTracker has been correctly installed. If it works correctly, ~/SimpleGazeTracker directory is created at the home directory. SimpleGazeTracker will show error message and terminate automatically if you have not connected camera unit in advance. .. code-block:: bash ~/SimpleGazeTracker-x.x.x$ /usr/local/simplegazetracker/sgtsrv