在macOS上运行(窗口化)wxPython Hello-World失败。
hello world示例:
#!/usr/bin/env python
import wx
app = wx.App(False) # Create a new app, don't redirect stdout/stderr to a window.
frame = wx.Frame(None, wx.ID_ANY, "Hello World") # A Frame is a top-level window.
frame.Show(True) # Show the frame.
app.MainLoop()
使用PyInstaller 3.2使用以下命令打包:
pyinstaller -F --windowed hello-world.py
终端中的错误输出显示:
...
...
./src/common/stdpbase.cpp(62): assert "traits" failed in Get(): create wxApp before calling this
Segmentation fault: 11
任何解决此问题的想法或提示?