Rather than use the Standalone Psychopy IDE, I would like my students to have access to Github Copilot or other AIs, which require an IDE like VSCode or JetBrains.
So we have tried to install python3.8 and psychopy via pip and via homebrew, but on some computers we run into dependency problems (e.g. HDF5, lzo, other libraries, for which I’ve tried StackOverflow fix suggestions but they haven’t always worked) that I haven’t succeeded in resolving.
I’m thinking another route would be to actually use the contents of the Standalone PsychoPy app, which has its own version of python, and all dependencies, right? That way, we wouldn’t have to navigate all the different dependency issues with brew and pip, and the instructions to do this could be much simpler.
So, I tried to point VSCode at the Python interpreter inside PsychoPy, /Applications/PsychoPy.app/Contents/Frameworks/Python.framework/Versions/3.8/Python, but it didn’t work. At first it complained that “Permission denied” which I think is probably because it’s inside of an App and so you don’t have permission to run it, but then even after I copied all the contents outside into a separate directory, I get a different error:
~/Documents/softwareStatsEquipment/psychopy/copiedOutOfPsychoPyApp/Contents/Frameworks/Python.framework/Versions/3.8/Python ~/.vscode/extensions/ms-python.python-2024.2.1/pythonFiles/create_venv.py --git-ignore
2024-03-11 13:38:26.541 [info] cwd: .
2024-03-11 13:38:26.542 [error] Error while running venv creation script: Error: spawn /Users/alex/Documents/softwareStatsEquipment/psychopy/copiedOutOfPsychoPyApp/Contents/Frameworks/Python.framework/Versions/3.8/Python EACCES
at Process.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -13,
code: 'EACCES',
syscall: 'spawn /Users/alex/Documents/softwareStatsEquipment/psychopy/copiedOutOfPsychoPyApp/Contents/Frameworks/Python.framework/Versions/3.8/Python',
path: '/Users/alex/Documents/softwareStatsEquipment/psychopy/copiedOutOfPsychoPyApp/Contents/Frameworks/Python.framework/Versions/3.8/Python',
spawnargs: [
'/Users/alex/.vscode/extensions/ms-python.python-2024.2.1/pythonFiles/create_venv.py',
'--git-ignore'
]
}
2024-03-11 13:38:26.542 [error] Error: spawn /Users/alex/Documents/softwareStatsEquipment/psychopy/copiedOutOfPsychoPyApp/Contents/Frameworks/Python.framework/Versions/3.8/Python EACCES
at Process.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -13,
code: 'EACCES',
syscall: 'spawn /Users/alex/Documents/softwareStatsEquipment/psychopy/copiedOutOfPsychoPyApp/Contents/Frameworks/Python.framework/Versions/3.8/Python',
path: '/Users/alex/Documents/softwareStatsEquipment/psychopy/copiedOutOfPsychoPyApp/Contents/Frameworks/Python.framework/Versions/3.8/Python',
spawnargs: [
'/Users/alex/.vscode/extensions/ms-python.python-2024.2.1/pythonFiles/create_venv.py',
'--git-ignore'
]
I see now that someone else has tried to do this, but not included the step of copying the files out of the PsychoPy app. Someone responded to say it was impossible, but it’s not clear if they are referring to even when copying it out of the app, are the files in the app compiled in some way or something so they can’t be used this way? Is there no way to capitalize on the Standalone Psychopy having the libraries that are needed?