Python 未找到WIMP主题-仅当与PyInstaller(Windows)捆绑时

Python 未找到WIMP主题-仅当与PyInstaller(Windows)捆绑时,python,pygtk,pyinstaller,Python,Pygtk,Pyinstaller,我使用Glade和PyGTK(在Windows7上)构建了一个简单的应用程序。从Python解释器来看,一切都很好。但是,在绑定PyInstaller后,我收到以下警告: GtkWarning: Could not find the icon 'gtk-missing-image'. The 'hicolor' theme was not found either, perhaps you need to install it. 而且GUI看起来很丑 这是两次跑步的截图 编辑 我在GTK安

我使用Glade和PyGTK(在Windows7上)构建了一个简单的应用程序。从Python解释器来看,一切都很好。但是,在绑定PyInstaller后,我收到以下警告:

 GtkWarning: Could not find the icon 'gtk-missing-image'. The 'hicolor' theme was not found either, perhaps you need to install it.
而且GUI看起来很丑

这是两次跑步的截图

编辑
我在GTK安装中找到了“hicolor”主题文件。它似乎只包含图标。因此,这不是一般外观的原因,而只是标题栏中显示的不同图标的原因。

基于

然而,他们的解决方案并没有像现在这样对我有效,所以我对它做了一些修改

将其添加到
spec
文件:

a.datas += [('gtkrc', r'C:\Python27\Lib\site-packages\gtk-2.0\runtime\share\themes\MS-Windows\gtk-2.0\gtkrc', 'DATA')]
a.binaries += [(r'lib\gtk-2.0\2.10.0\engines\libwimp.dll', r'C:\Python27\Lib\site-packages\gtk-2.0\runtime\lib\gtk-2.0\2.10.0\engines\libwimp.dll', 'BINARY') ]
这是给
\uuuuu init\uuuuu

gtk.rc_add_default_file(resource_path("gtkrc"))
现在看起来不错。。。(顺便说一句,它没有解决关于丢失图标和“hicolor”主题的原始警告,但这并不重要。)