OS: MacOS Mojave version 10.14.6
Psychopy version: 2021.2.3
Python version: 2.7.16
Python 3 version: 3.9.13
I am trying to run an experiment directly from the terminal, rather than having to open psychopy (it’s a slightly old macbook, and it takes a while for the psychopy GUI to open up).
if I run it using
python /path/to/experiment.py
I get the error ImportError: No module named psychopy
. If I look for psychopy with which psychopy
, or try to import
from psychopy, it also fails to find it.
Psychopy is definitely installed (and in the Applications folder), and running the psyexp file from within the GUI works fine. If I try to (re)install psychopy using homebrew, it says that it is already installed (and linked).
I’m not sure how to get python to recognise psychopy, and much searching online, including these forums, has gotten me nowhere so far.
[EDIT: trying to install psychopy via pip fails, so far as I can tell due to deprecated dependencies (namely pocketsphinx). I don’t know if this matters.]
Thanks!