Install external packages in PsychoPy Standalone on Mac

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.

1 Like

Certainly, I can tell you a bit more about what’s caused your experience and what’s changed in 2025.1

In general PsychoPy aims to install your plugins to ~/.psychopy3/packages because a) it’s better on a multi-user system if one person’s plugins don’t affect another user and b) the user might not have admin permissions to alter /Applications folder whereas they can always update their home folder. When PsychoPy installs a plugin it uses pip install -U --user <package where the --user flag tells pip to install into the user stie (which we’ve set to be ~/.psychopy3/packages)

In your case, you’ve gone with a custom pip command but not used --user so it went to the wrong place and didn’t then get found.

Fixes:

In 2025.1 we added documentation to the pip install terminal to make this more clear

In 2025.2 (in the summer, but already available in the dev branch of the repo) we’ve added back in the option to search pypi and install packages with just a button-click so that for most uses you won’t need to use the pip terminal at all. Unfortunately some changes at pypi meant the previous search method stopped working and we had to build a new one. :cry:

Thanks for the explanation! It cleared up my confusion.

I installed the "Stable“ 2024.2.4 version instead of “Beta” 2025.1 version. I guess it’s recommended that we use the latest available version when possible?

Either way, thanks for the documentation and for developing the search pypi solution, which helps make installing new packages much easier! Looking forward to future releases!