There are two different ways to install Expyriment. The recommended method requires an active internet connection. If you need to install Expyriment on a computer that has no internet connection (like lab PCs), please use the alternative method.
Each method will rely on an additional (different) Python environment and will not alter the Python environment provided by Apple.
Install Python 3.13.0
In a terminal, run:
sudo python3 -m pip install -U expyriment[all]
(Omit
[all]
to install without additional optional features)
On an PC with internet connection (same OS, architecture and Python version!)
On the Desktop, create a directory called
Expyriment_Installation
Download Python 3.13.0 to
Expyriment_Installation
In a terminal, run:
sudo python3 -m pip download -d ~/Desktop/Expyriment_Installation expyriment[all]
(Omit
[all]
to install without additional optional features)
- To use enhanced video playback, download ffmpeg to
Expyriment_Installation
- Copy the directory
Expyriment_Installation
from the Desktop to a portable storage device
On the target PC
Copy the directory
Expyriment_Installation
from the portable storage device to the DesktopInstall
Expyriment_Installation/python-3.13.0-macos11.pkg
In a command prompt, run:
sudo python3 -m pip install --no-index --find-links ~/Desktop/Expyriment_Installation -U expyriment[all]
(Omit
[all]
to install without additional optional features)
To use enhanced video playback, run:
mkdir -p ~/.local/bin cd ~/Desktop/Expyriment_Installation tar -xf ffmpeg-5.1.zip mv ffmpeg ffprobe ffserver ~/.local/bin echo 'export PATH=$PATH:~/.local/bin' >> ~/.bash_profile source ~/.bash_profile
Be aware of multiple Python installations
If, after installation, you get errors about Expyriment (or one of its dependencies) not being installed, chances are you try to import Expyriment in the "wrong" (i.e. Apple's) Python environment.
Make sure you are calling
python3
.
Do not start your experiments out of IDLE
If you are using the IDLE editor that comes with the Python installation, be aware that IDLE itself is written in Python. Starting your Expyriment programme out of IDLE (by clicking on "Run" or by pressing F5), might thus lead to improper timing!
We therefore strongly suggest to run Expyriment programmes from the command line when testing participants.
MacOS does not report accurate visual presentation times
After the necessary switch to Pygame2 that happened with Expyriment 0.11.0, MacOS does not seem to be reporting accurate visual presentation times. MacOS has a compositor running which cannot be turned off. In theory, fullscreen programmes should be able to bypass it automatically, however, this does not seem to be the case in our experience. While Expyriment on MacOS will work perfecly fine for designing and implementing your experiments, we do not recommend to use MacOS to run an actual experiment (i.e. test participants)!
Expyriment will return a scaled screen in window mode
MacOS currently does not seem to allow non-scaled (HiDPI) PyGame windows. This means that when in window mode, the Expyriment screen will be in scaled coordinates, and not in pixel coordinates of the monitor. To get a proper non-scaled screen, display scaling has to be switched off in system settings.