Not totally sure what’s up with this, but I have a few things you could try.
Are you using the standalone installer or a pip install? If you are using the standalone installer it comes with its own version of Python, so your installed packages won’t matter. It may be easiest to grab an earlier standalone, like 1.79 or 1.8, from here: https://github.com/psychopy/psychopy/releases?after=1.81.00rc1
GUI, at least as of now, uses pyQt, which isn’t listed. There are bits of pyQt4 and pyQt5, but as I recall 4 is the one that psychopy.gui uses.
I kind of doubt this is it, but in system preferences, under security settings > accessibility, make sure PsychoPy is listed as a program that is allowed to control your computer.
Thanks for the response. I’m running the script from within a virtualenv, so I can get an idea of which packages are needed. Interestingly I copied PyQt4 into the virtualenv, and the crash changed from the above to:
from psychopy import visual, gui
File "~/TOM/TOM/lib/python2.7/site-packages/psychopy/gui/__init__.py", line 33, in <module>
from .qtgui import *
File "~/TOM/TOM/lib/python2.7/site-packages/psychopy/gui/qtgui.py", line 19, in <module>
from PyQt5 import QtWidgets
ImportError: No module named PyQt5
I’m going to try copying PyQt5 in and see how that changes things.
Adding sip in just seems to have returned the program to it’s original problem. This seems to me to mean that the issue is independent of PyQt. Having had a quick tinker with the psychopy the issue occurs if PyQt4 or wxPython are used. I will try running the script through gdb and see what that turns up.
I’m not exactly sure what the problem is but we didn’t have compatibility with wx4 in PsychoPy 1.85.x so that could be part of your problem. That has been added (and PsychoPy should now install all its dependencies except for pyo) if you use the current repository version (or psychopy=1.90.dev3 test release)
I’ve been trying the 1.80.86 standalone release, and am getting stuck with the error ValueError: dylib libevent.dylib could not be found. I assume this is because I use the Mac Ports package manager and as such most of my libs are in /opt/local/, however adding the line search_path.append('/opt/local/lib/') to pyglet/lib.py is having no effect. Any ideas what might get it working?