Using psychopy standalone on mac with visual studio code


I installed Standalone Psychopy On a Mac computer and I use VS Code as a code editor. How can I add the standalone psychopy as a python interpreter to vs code?

Trying to add Applications/ did not work.

The standalone isn’t going to work for you for this purpose - you’ll need to install the PsychoPy library and its many dependencies into an environment with a regular Python interpreter. It’s best to create a separate environment just for that (eg with Conda), so that you don’t break your everyday Python installation (and vice versa). I imagine that VSCode is like most IDEs and will allow you to simply flick between the Python interpreters in each environment.

The disadvantage of not using the standalone is that you have to manage all of the third-party dependencies yourself, and that can cause a few hiccups along the way.

Probably best to follow the instructions for the developer install of PsychoPy - that way you can use gut to control the PsychoPy version (eg to keep consistent with the standalone app that you’ll likely use when running the actual experiment).

There’s a workshop coming up next week for new developers I think - that would cover everything you need to know and more about getting set up.

Sign-ups for the free workshop are here on Eventbrite: Contributing to PsychoPy Workshop Tickets, Wed. & Fri., 26 & 28 April 2023 from 2-5 pm, UK Time.


I find this a bit strange. If standalone PsychoPy is installed on my machine, with the appropriate python version and all batteries included (1.2 GB disk space), and apparently uses its own virtual environment, why can’t I tap into (activate) that virtual environment from outside, e.g., from VS Code? Is it a protection issue, i.e., I should not be able to install additional software into that environment, or even worse replace parts?