平台是使用Python 2.7和GTK3 +安装了Windows 7 64位来自http://sourceforge.net/projects/pygobjectwin32/files/?source=navbar捆绑GTK3 +与py2exe
的exe文件被编译,但无法运行,因为这
The following modules appear to be missing
['gi.repository.Gdk', 'gi.repository.Gtk', 'overrides.registry']
我怎样才能正确地包含这些文件?
进口我.py文件
from gi.repository import Gtk, Gdk
我的设置文件
#!/usr/bin/env python
from distutils.core import setup
import py2exe, sys
sys.path.append("C:\Python27\Lib\site-packages\gnome")
sys.path.append("C:\Python27\Lib\site-packages\repository")#tried including these extra dirs
sys.path.append("C:\Python27\Lib\site-packages\override")#tried including these extra dirs
sys.path.append("C:\Python27\Lib\site-packages\gi") #tried including these extra dirs
setup(
options = {
'py2exe': {
'bundle_files': 1,
#this does not work 'includes': ['Gtk']
}
},
console=["gui.py"],
zipfile=None
)
的可执行错误时,跑:
ImportError: MemoryLoadLibrary failed loading gi\_gi.pyd
感谢
我一直在玩这个捆绑我的窗户pyGObject应用程序,我已经注意到了,整个工作目录已从50meg发展到180meg(pygtk的 - > pygobject)。 – Naib
你可以缩小这个。我已经得到了它的约56美元 – Naib
downto推荐其他工具不回答这个问题。 py2exe确实被主动维护,并且我对cx_freeze有更多的麻烦。 – CodeMouse92