I want to install python from python.org and have it work with wxPython in a terminal on macOS:
- Install python 3.9.13 using the macOS 64-bit universal2 installer
- Install wxPython using pip -
pip3 install -U wxPython
- Start python in a shell and try and fire up a wx app:
DB0837:~ andypiper$ /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
Python 3.9.13 (v3.9.13:6de2ca5339, May 17 2022, 11:37:23)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.App()
This program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.
Please don't point me at brew or pyenv or anaconda or framework builds - I want the above combination to work, and it seems not to. The download from python.org is a framework build and if I run this from IDLE it works fine using the exact same version of python, so it feels like it must be some macOS security issue or shell/python interaction