I’m preparing a multi-site experiment, and I’m trying to make sure we are using the exact same setup. All machines will use Ubuntu 24.04.3 LTS and PsychoPy Version: 2024.2.4. Until now, I’ve always used conda environments, but that’s not an option this time as the lead group is using a standalone installation.
My question is, what is the most straightforward to ensure all machines are using not only the same PsychoPy version but also the same python packages? One package that’s relevant is the PsychToolbox library for audio.
For example, if I use the PsychoPy Standalone (Stable) installation with GUI and I set the PsychoPy Version to 2024.2.4 in two different machines (both with Ubuntu 24.04.3 LTS), how likely is that I will get the same package versions? Alternatively, can I get some text file from an already existent installation that specifies packages versions to use in a new installation?
You can do that with the standalone installation, yes! First thing you need to do is work out where the Python executable is; to do that just open Coder and run the following:
import sys
print(sys.executable)
With that file path as <python>, and the folder you want to put the requirements file in as <folder>, you can then call the following in terminal to get packages:
You’ll need to then go into this file and remove psychopy@file://etc. from the list as this will be a file path from the virtual machines from which we built the standalone app (so won’t make any sense to the machine you’re installing on).
Then, on the machines you want to apply the packages to, do the same trick to get the Python executable (<python>) and this time have <folder> be wherever you copied that requirements.txt file from before to. Then call the following in terminal:
And it’ll install all the same package versions as in the first machine.
You can do a similar thing with PsychoPy Studio (which is much easier to install on Linux) too; it’s just slightly different commands (uv pip ... --python <python> rather than <python> -m pip ...)