PsychoPy Standalone version: v2024.2.4
OS: macOS, 14.6.1, Apple M2 Chip
Problem: I want to install scikit-image to PsychoPy Standalone. It’s probably easier to create a conda env with psychopy and skimage – and this is my normal workflow – but I want to avoid the added complexity of managing conda
environments for my bachelor-level psychology student who has minimal coding experience.
Following the official instruction, in PsychoPy Coders, I navigated to Tools → Plugin/packagemanagers → Packages. At first, the package list was blank – no external packages had been installed yet. Then I clicked Open PIP terminal, and a dialogue box pops out, saying “All commands will be automatically prefaced with:
“/Applications/PsychoPy.app/Contents/MacOS/python” -m”. Then I ran pip install -U scikit-image
, and then it seemed to me that the package was successfully installed.
However, when I tried to import skimage
in my script, I still got the ModuleNotFoundError error. Also, the Packages list in the Plugin/packagemanagers dialog remained empty.
I checked the site-packages directory at Applications/PsychoPy.app/Contents/Resources/lib/python3.10/site-packages
, and confirmed that skimage was indeed installed there! Why wasn’t PsychoPy recognizing it?
Solution/Workaround: Here’s what eventually worked: cp -r /Applications/PsychoPy.app/Contents/Resources/lib/python3.10/site-packages/ ~/.psychopy3/packages/lib/python/site-packages
. Basically, (I don’t know why but) PsychoPy Standalone looks for external packages in ~/.psychopy3/
. By manually copying the installed package from the application’s internal site-packages to the .psychopy3
directory, everything started working.
Now, the Packages list under Coders → Tools → Plugin/packagemanagers → Packages displayed the installed packages correctly.
I hope the developers of PsychoPy can take care of this issue, either to fix the path, or to provide a better documentation.