ModuleNotFoundError: No module named 'pyautogui'

PsychoPy uses its own Python virtual environment if you’re running from the app, so installing packages to your system Python won’t do anything. There are ways to install additional packages into the app’s virtual environment, see here: Adding new python module to standalone psychopy