How to install the MindTrace Toolbox

The MindTrace toolbox functions as an interface between your experiment code and the webcam. After connecting to the toolbox from within your experiment, you can easily send commands to the toolbox in order to e.g. start recording via the webcam or take snapshots. Sending the appropriate commands for calibration points can also be easily communicated to the toolbox. Additionally, the toolbox ensures that all the data is stored in an appropriate format, so that it can be uploaded seamlessly into our system and analyzed immediately.

What do you need on your computer to make use of the MindTrace Toolbox?

First of all, you need Python 3 (up to version 3.6.5). Normally, Python comes pre-installed with all unix systems (Mac OS and Linux). However, you need to make sure that you are indeed using Python 3 (up to version 3.6.5). You can easily check your python version by pasting this line in your terminal:

python -V

If you are already running Python 3, there is no need to install it again. If you execute the commands below in a Mac or Linux environment, the installation command for Python 3 will be ignored, if Python 3 is already installed on your system.


Mac OS in general has Python 2 pre-installed. Because our Toolbox requires Python 3 and a few additional packages for Python itself and your system, we want to make sure that everything is installed properly. In order to do so, you need to install Homebrew, which is a package manager for Mac OS. Paste the following line into your terminal to install Homebrew:

/usr/bin/ruby -e "$(curl -fsSL"

Now that we have Homebrew installed, we can continue to install Python 3, ffmpeg (package for handling multimedia data), pip (python package manager), and numpy (scientific computing package).

brew install python3 ffmpeg
sudo easy_install pip3
pip3 install numpy


Linux already has its own package manager. You can directly continue to install Python 3, ffmpeg (package for handling multimedia data) , pip (python package manager), and numpy (scientific computing package) by executing the following commands:

sudo apt-get install python3 ffmpeg
sudo easy_install pip3
pip3 install numpy


You can download Python 3 via the following URL: Make sure that during the installation you select to add the Python install to your path so that you can easily run commands via the terminal. If the installation process doesn’t offer you that option it is most likely doing it automatically.

You can download ffmpeg via the following URL: Unzip ffmpeg directly to your C:\ drive so that the resulting path and folder is C:\ffmpeg. Finally, you need to add the ffmpeg.exe to your environment variables. That will make it easy to call ffmpeg from within the terminal.


In order to do that, open the Start menu and right click on “Computer” and then click on “Properties”.


Select “Advanced system settings”:


Click on “Environment variables”:


Edit the Path variable:


Add C:\ffmpeg\bin at the end. Make sure that this path is separated by a semi-colon (;) from the previous folder.

Finally, you can install pip, the package manager for Python, using the following command:

easy_install pip

And with pip installed, you can now install numpy as well:

pip install numpy


About the author

Dr. Adjmal Sarwary is the founder and CEO of MindTrace. He always enjoys a good challenge, from scientific work to building up MindTrace itself.

You may also like