Psychopy on Big Sur on mac

New release of pyglet (v1.5.11) should fix issue with CoreFoundation. Furthermore, it should prevent future issues with finding libraries.

I don’t think they’ll fix this one:

dyld: Library not loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  Referenced from: /Applications/PsychoPy.app/Contents/MacOS/python
  Reason: image not found

because I’m getting that even if I launch a script that contains no pyglet calls (just print('hello'))

some potential useful info here about changes in Big Sur
https://github.com/nyholku/purejavahidapi/issues/75

OK, some more positive news… I’ve just had a working setup on Big Sur where I made only the following tweaks:
https://github.com/psychopy/psychopy/pull/3309/commits/f0d3533e19b5f03d4b7a93e79ecd87b5b392750d

That was based on Python 3.8 installed from python.org so we might yet have trouble when we port that into the Standalone app bundle (which so far has been built on Py3.6) but fingers crossed it means we should be able to get something working soon!

OK, there’s now a test release availabe that I think works fine on Big Sur on everything except for the new TextBox (I have the fix for that implemented as well but it requires rebuilding the binaries)

Hopefully 2020.2.7 final will be out this afternoon with full Big Sur support back in

1 Like

It ended up being called 2020.2.8 after a last minute bug in 2020.2.7! But I think this should fix the Big Sur troubles:

Thank you so much for the commitment and speedy fix Jon! Amazing stuff!

1 Like

Thanks so much Jon for the rapid fix. PsychoPy 2020.2.8 seems to be running just fine on my MacBook Pro 16" with Big Sur.

1 Like

Just wanted to echo my sincere thanks for the speedy changes, Jon! I am extremely grateful (as are my graduate students).

1 Like

Eek. So I have some people doing a longitudinal training study (which is covering a significant period of time) that I created in PsychoPy v1.90.2. Someone’s just updated their OS to Big Sur and they’re now receiving the following error message:

Traceback (most recent call last):
File “/Users/username/Music/Current/Study/Experimentfolder/Experiment.py”, line 2, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/init.py”, line 26, in
from .text import TextStim
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/text.py”, line 28, in
import psychopy.event
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/event.py”, line 63, in
from pyglet.window.mouse import LEFT, MIDDLE, RIGHT
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/window/init.py”, line 1896, in
gl._create_shadow_window()
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/init.py”, line 384, in getattr
import(import_name)
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/gl/init.py”, line 100, in
from pyglet.gl.lib import GLException
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/gl/lib.py”, line 141, in
from pyglet.gl.lib_agl import link_GL, link_GLU, link_AGL
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/gl/lib_agl.py”, line 49, in
framework=‘/System/Library/Frameworks/OpenGL.framework’)
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/lib.py”, line 118, in load_library
return self.load_framework(kwargs[‘framework’])
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/lib.py”, line 286, in load_framework
raise ImportError(“Can’t find framework %s.” % path)
ImportError: Can’t find framework /System/Library/Frameworks/OpenGL.framework.

As mentioned in the thread above, the issue seems to be with Pyglet and OpenGL. Can anyone recommend a potential way to fix this in such an old version of PsychoPy?

Help much appreciated!

Looking at this from a PsychoPY 1.90.2 perspective: Hotfixes for getting working on Big Sur by peircej · Pull Request #3309 · psychopy/psychopy · GitHub

I can find (both attached):

/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/init.py
/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/textbox/fontmanager.py

But I’m not sure what the equivalent file for ‘visual/textbox2/textbox2.py’ would be? The textbox folder (there isn’t a textbox2 folder) contains only:

init.py
init.pyc
pycache
fontmanager.py
fontmanager.pyc
freetype_bf
parsedtext.py
parsedtext.pyc
textgrid.py
textgrid.pyc
textureatlas.py
textureatlas.pyc
TODO.txt

psychopy/visual/init.py has very similar code to that in Jon’s example, whereas
visual/textbox/fontmanager.py is quite different:

import math
import numpy as np
import unicodedata as ud
from matplotlib import font_manager
from psychopy.core import getTime
from .textureatlas import TextureAtlas
from pyglet.gl import (glGenLists, glNewList, GL_COMPILE, GL_QUADS,
glBegin, glTexCoord2f, glVertex2f, glEnd, glDeleteLists,
glEndList, glTranslatef, glDeleteTextures)

What edits would you suggest I make?fontmanager.py (18.9 KB) init.py|attachment (2.7 KB)

Just to add to this… I know that in general it’s preferred if people continually update their code to the most recent version of PsychoPy, but at the time I wrote it my code worked best in 1.90.2 (which is to say that it didn’t run at all in 1.90.3) so I stuck with it. It’s a several month-long training scheme, with several twists and turns, so not the simplest thing to just update (well, not for me anyway). By this point I’ve had participants taking the training for my experiment for a great deal of time using their own downloaded copies of 1.90.2, so it’s neither easy nor practical for me to have to update the whole lot (although rest assured, I’d write any future experiments in the most up-to-date PsychoPy version). As such, some thoughts on how to save it from the perils of Big Sur would be greatly appreciated if at all possible… thanks :slight_smile:

Hi @Jon
Just downloaded the 2020.2.10 release standalone and installed on my Mac with Big Sur 11.1
Alas, it does not start and shows a PsychoPy error instead.
Any more leads on this?
Thanks!
Marc

shows a PsychoPy error instead.

Error messages contain text that is essential to working out what’s going on. If you don’t tell us what the error message was (all of it) then we really can’t help


That’s literally all.
Nothing in the console then either

OK, thanks. That’s not very helpful of Big Sur then! :wink:
I wonder if any useful information was stored in the log file. Could you go to a terminal window and run:

cat ~/.psychopy3/last_app_load.log

Maybe that will give us some clues. Otherwise I’m at a loss how to help right now

Thanks @Jon. I’m struggling a bit. When I open a Terminal and copy and paste the command I get " No such file or directory" I then tried a few things including to navigate to the top level and into the Applications directory where PsychoPy3.app lives. I also changed the spelling from psychopy3 to PsychoPy3 but I always get the same error/
Sorry, I am not too familiar with terminal so I’m probably missing something trivial.
Can you suggest what else I could try to make the command work?

~ is your user folder (also called your home folder). If you are more comfortable using the Mac Finder than the Terminal, then select “Home” from the “Go” menu. Push CMD + SHIFT + . to see invisible files (files or folders that start with a . are normally invisible). At the top level of your user folder, you should now see a folder called .psychopy3, which should contain that log file.


Looks like there is no log file – which is why the terminal couldn’t find it I guess…
Any other ideas what I could do?

I am fairly new to PsychoPy, but I am having trouble getting the program to run on the new iOS, Big Sur. PsychoPy was working for me this morning prior to my computer update, and I have been unable to open the program since. I have attached some images that may provide additional info. This could be something that I am missing, but I appreciate any assistance! Screen Shot 2021-01-18 at 9.23.14 PM