在Mac OS X上运行PyInstaller,我得到gtk

时间:2017-01-11 05:37:28

标签: python macos gtk pyinstaller

我在Mac OS X中使用PyInstaller和Python 2.7.11,并且在尝试使用 pyinstaller --onefile devprog.spec 生成可分发的单个文件时遇到了问题。

总结一下输出,我看到了:

4622 INFO: Loading module hooks...
4622 INFO: Loading module hook "hook-gtk.py"...
4625 WARNING: Hidden import "gtkglext" not found!
4626 WARNING: Hidden import "gdkgl" not found!
4627 WARNING: Hidden import "gdkglext" not found!
4628 WARNING: Hidden import "gtk.gdk" not found!
4628 WARNING: Hidden import "gtk.gtkgl" not found!
4628 WARNING: Hidden import "gtk.gtkgl._gtkgl" not found!
4630 WARNING: Hidden import "gtkgl" not found!
4636 WARNING: Hidden import "gtk.glade" not found!

当我运行可执行文件时,我得到以下输出:

2017-01-11 15:49:21.596 devprog[3508:143573] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 
> Programmer
> running
 > Gui __init__
Running in a bundle
Abs path: /var/folders/vj/dyr0qmbs1wn6q84z9rk22dd00000gn/T/_MEItMf9Hz
runtime_dir = /var/folders/vj/dyr0qmbs1wn6q84z9rk22dd00000gn/T/_MEItMf9Hz
Script location: devprog.py
> initProgrammer
> initCommander
> initMessenger
> commanderPanel
objc[3508]: Class GNotificationCenterDelegate is implemented in both /var/folders/vj/dyr0qmbs1wn6q84z9rk22dd00000gn/T/_MEItMf9Hz/libgio-2.0.0.dylib and /usr/local/opt/glib/lib/libgio-2.0.0.dylib. One of the two will be used. Which one is undefined.
Failed to execute script devprog
Traceback (most recent call last):
  File "devprog.py", line 1579, in <module>
  File "devprog.py", line 491, in __init__
  File "devprog.py", line 249, in commanderPanel
AttributeError: '__main__.g-option-context-error-quark' object has no attribute 'scale_simple'

我已尝试过各种解决方案,例如指定隐藏的导入,如PyInstaller文档和论坛所示,但仍然遇到此问题。任何建议表示赞赏。

谢谢,    达伦

0 个答案:

没有答案