Nuitka doesn't support wxPython on MacOs
See original GitHub issueHello!
Is Nuitka using virtualenv like technology? After I packaged my WxPython program with Nuitka, I ran the program with the following error prompt, which is the same as if Virtualenv were running a WxPython program.
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.
Virtualenv runs the WxPython program with python2.7 step-by-step as follows,But python3.7 is normal:
(noticeAppByPy2) mac@zqw-10 o % python -c “import wx;app=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.
`import wx
app = wx.App() window = wx.Frame(None, title = “wxPython - www.yiibai.com”, size = (400,300)) panel = wx.Panel(window) label = wx.StaticText(panel, label = “Hello World”, pos = (100,100)) window.Show(True) app.MainLoop()`
Now the question is, how can this error be resolved when using Nuitka to package a WxPython program? Thank you very much!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:12 (6 by maintainers)
Top GitHub Comments
Fogive my failure to update. With the new option
--macos-create-app-bundle
and--macos-disable-console
the wx works fine. This bundle mode currently only works in standalone mode, but not in onefile mode. It’s required for macOS and wx to be a GUI program, which seems impossible without being a bundle.This removes wx from the equation entirely. It reproduces above C code in Python. It seems the framework loads with a simple “find_library”, in Python and while it reports an error message to not locating the plist as above, there is no reason to assume the framework didn’t load, the first call works, while the second to bring the process to the front does not.