Psychopy on Big Sur on mac

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/”, line 2, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging
File “/Applications/”, line 26, in
from .text import TextStim
File “/Applications/”, line 28, in
import psychopy.event
File “/Applications/”, line 63, in
from pyglet.window.mouse import LEFT, MIDDLE, RIGHT
File “/Applications/”, line 1896, in
File “/Applications/”, line 384, in getattr
File “/Applications/”, line 100, in
from import GLException
File “/Applications/”, line 141, in
from import link_GL, link_GLU, link_AGL
File “/Applications/”, line 49, in
File “/Applications/”, line 118, in load_library
return self.load_framework(kwargs[‘framework’])
File “/Applications/”, 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):


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

psychopy/visual/ has very similar code to that in Jon’s example, whereas
visual/textbox/ 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 import (glGenLists, glNewList, GL_COMPILE, GL_QUADS,
glBegin, glTexCoord2f, glVertex2f, glEnd, glDeleteLists,
glEndList, glTranslatef, glDeleteTextures)

What edits would you suggest I make? (18.9 KB)|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?

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 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

What version of PsychoPy are you using? The latest release includes changes needed for Big Sur compatibility.

I have the latest version of PsychoPy. I’m wondering if it has to do with this value error? If so, I’m still unsure how to fix the problem.

@Michael I have the same problem and also the latest version. Just downloaded the standalone for Mac (2020.2.10) again to be extra sure.

These both look like they could be a problem with corrupted preferences files. You should delete them so that PsychoPy creates a fresh copy. See here for how to find them:

1 Like

HI @Michael. Thanks for this. I deleted the appData and userPrefs cfg files and then tried starting Psychopy again. Same issue. However, now I can find a last_app_load.log file, which I wanted to upload, but it appears I cannot because it is not in the right format.
I will copy the text below instead

Traceback (most recent call last):
  File "/Applications/", line 378, in __getattr__
    return getattr(self._module, name)
AttributeError: 'NoneType' object has no attribute '_create_shadow_window'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/", line 461, in <module>
  File "/Applications/", line 440, in _run
    exec(compile(source, path, 'exec'), globals(), globals())
  File "/Applications/", line 104, in <module>
  File "/Applications/", line 100, in main
  File "/Applications/", line 28, in start_app
    app = PsychoPyApp(0, showSplash=showSplash)
  File "/Applications/", line 210, in __init__
    self.onInit(testMode=testMode, **kwargs)
  File "/Applications/", line 350, in onInit
  File "/Applications/", line 584, in showBuilder
  File "/Applications/", line 566, in newBuilderFrame
    from .builder.builder import BuilderFrame
  File "/Applications/", line 50, in <module>
    from .dialogs import (DlgComponentProperties, DlgExperimentProperties,
  File "/Applications/", line 31, in <module>
    from .. validators import NameValidator, CodeSnippetValidator
  File "/Applications/", line 27, in <module>
    from pyglet.window import key
  File "/Applications/", line 1896, in <module>
  File "/Applications/", line 384, in __getattr__
  File "/Applications/", line 100, in <module>
    from import GLException
  File "/Applications/", line 141, in <module>
    from import link_GL, link_GLU, link_AGL
  File "/Applications/", line 49, in <module>
  File "/Applications/", line 118, in load_library
    return self.load_framework(kwargs['framework'])
  File "/Applications/", line 286, in load_framework
    raise ImportError("Can't find framework %s." % path)
ImportError: Can't find framework /System/Library/Frameworks/OpenGL.framework.
Error in atexit._run_exitfuncs:
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at /Users/robind/projects/buildbots/macosx-vm6/dist-osx-py36/Phoenix/ext/wxWidgets/src/common/wincmn.cpp(478) in ~wxWindowBase(): any pushed event handlers must have been removed