平台是Windows 7 64位,使用Python2.7和GTK3+安装在http://sourceforge.net/projects/pygobjectwin32/files/?source=navbar
exe已编译,但无法运行,因此
The following modules appear to be missing
['gi.repository.Gdk', 'gi.repository.Gtk', 'overrides.registry']
如何正确地包括这些文件?在
在my.py文件中导入
^{pr2}$我的安装文件
#!/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
谢谢
你需要把“gi”添加到“packages”中。在
我还没有在64位上测试过,但这是设置.py我以前用cx_freeze构建,py2exe看起来很长时间都没有维护。在
根据您使用的库,您可能需要添加一些丢失的dll,请查看cx_freeze的输出。在
不久前,我在gnome的wiki上发布了同样的消息: https://wiki.gnome.org/Projects/PyGObject#Building_on_Win32_with_cx_freeze
相关问题 更多 >
编程相关推荐