Wxpython stops working on macOS 12.6.1: framework build error

This is intended as a heads-up (unless anyone can explain more) in case anyone else has a similar problem. I think it points to a wxWidgets problem.

I had a user who was having trouble running a wxpython application that had been installed some time back and had been running just fine until at some point running the same command was suddenly getting the screen access error ("…please run with framework build…") even though they were running with an app that had worked before. It is not obvious what had changed on the computer.

Installing a fresh miniforge python & wx4.1 in a separate environment and then using the new pythonw still failed on a call to wx.App().

The message here: How to run wxPython with the python.org installer on macOS 12.4 (Monterey) (leading to How to run wxPython with the python.org installer on macOS 12.4 (Monterey) - Stack Overflow) gave the clue that wxWidgets method IsDisplayAvailable is failing. Not sure why that is the case, but commenting it from core.py provided a clumsy but satisfactory workaround.

Hi Brian,

The root of this problem has been fixed in the master branch (https://github.com/wxWidgets/Phoenix/pull/2252), but I think that it has not been released yet. As a bonus, it makes needing a “framework build” (and so, running with pythonw when using Anaconda Python) unnecessary.