PyInstaller打包的wxPython简单的Hello-World应用程序崩溃在macOS上

时间:2017-01-12 13:02:15

标签: python macos wxpython wxwidgets pyinstaller

在macOS上运行(窗口化)wxPython Hello-World失败。

  • PyInstaller:3.2和3.3.dev0 + 8892e11
  • Python:2.7.12
  • wxPython:3.0.2.0
  • osx-cocoa OS:macOS Sierra 10.12.2

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

任何解决此问题的想法或提示?

0 个答案:

没有答案