QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1426|回复: 0

py2exe pygtk出现错误

[复制链接]
发表于 2005-5-28 16:23:45 | 显示全部楼层 |阅读模式
我用python 2.4.1  pygtk2.4.1(for windows) py2exe 0.5.4创建了一个pygtk的窗口,程序能正常运行,但就是在python setup.py py2exe的时候出错了,提示缺少模块,错误如下:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\zzh>d:

D:\>cd 123

D:\123>path D:\GTK\bin\;d:\python24\;

D:\123>python setup.py py2exe
running py2exe
creating D:\123\build
creating D:\123\build\bdist.win32
creating D:\123\build\bdist.win32\winexe
creating D:\123\build\bdist.win32\winexe\collect
creating D:\123\build\bdist.win32\winexe\temp
creating D:\123\dist
*** searching for required modules ***
*** parsing results ***
creating python loader for extension 'gtk._gtk'
creating python loader for extension 'gobject'
*** finding dlls needed ***
*** create binaries ***
*** byte compile python files ***
byte-compiling D:\123\build\bdist.win32\winexe\temp\gobject.py to gobject.pyc
byte-compiling D:\123\build\bdist.win32\winexe\temp\gtk._gtk.py to gtk\_gtk.pyc
creating D:\123\build\bdist.win32\winexe\collect\gtk
byte-compiling d:\python24\lib\UserDict.py to UserDict.pyc
byte-compiling d:\python24\lib\atexit.py to atexit.pyc
byte-compiling d:\python24\lib\copy.py to copy.pyc
byte-compiling d:\python24\lib\copy_reg.py to copy_reg.pyc
byte-compiling d:\python24\lib\dis.py to dis.pyc
byte-compiling d:\python24\lib\fnmatch.py to fnmatch.pyc
byte-compiling d:\python24\lib\glob.py to glob.pyc
byte-compiling d:\python24\lib\inspect.py to inspect.pyc
byte-compiling d:\python24\lib\linecache.py to linecache.pyc
byte-compiling d:\python24\lib\macpath.py to macpath.pyc
byte-compiling d:\python24\lib\ntpath.py to ntpath.pyc
byte-compiling d:\python24\lib\opcode.py to opcode.pyc
byte-compiling d:\python24\lib\os.py to os.pyc
byte-compiling d:\python24\lib\os2emxpath.py to os2emxpath.pyc
byte-compiling d:\python24\lib\popen2.py to popen2.pyc
byte-compiling d:\python24\lib\posixpath.py to posixpath.pyc
byte-compiling d:\python24\lib\re.py to re.pyc
byte-compiling d:\python24\lib\repr.py to repr.pyc
byte-compiling d:\python24\lib\site-packages\gtk-2.0\gtk\__init__.py to gtk\__in
it__.pyc
byte-compiling d:\python24\lib\site-packages\gtk-2.0\gtk\keysyms.py to gtk\keysy
ms.pyc
byte-compiling d:\python24\lib\site-packages\pygtk.py to pygtk.pyc
byte-compiling d:\python24\lib\sre.py to sre.pyc
byte-compiling d:\python24\lib\sre_compile.py to sre_compile.pyc
byte-compiling d:\python24\lib\sre_constants.py to sre_constants.pyc
byte-compiling d:\python24\lib\sre_parse.py to sre_parse.pyc
byte-compiling d:\python24\lib\stat.py to stat.pyc
byte-compiling d:\python24\lib\string.py to string.pyc
byte-compiling d:\python24\lib\token.py to token.pyc
byte-compiling d:\python24\lib\tokenize.py to tokenize.pyc
byte-compiling d:\python24\lib\traceback.py to traceback.pyc
byte-compiling d:\python24\lib\types.py to types.pyc
byte-compiling d:\python24\lib\warnings.py to warnings.pyc
*** copy extensions ***
copying d:\python24\lib\site-packages\gtk-2.0\gobject.pyd -> D:\123\dist
copying d:\python24\lib\site-packages\gtk-2.0\gtk\_gtk.pyd -> D:\123\dist
*** copy dlls ***
copying C:\WINDOWS\system32\python24.dll -> D:\123\dist
copying D:\GTK\bin\libgdk-win32-2.0-0.dll -> D:\123\dist
copying D:\GTK\bin\libgthread-2.0-0.dll -> D:\123\dist
copying D:\GTK\bin\iconv.dll -> D:\123\dist
copying D:\GTK\bin\libgobject-2.0-0.dll -> D:\123\dist
copying D:\GTK\bin\libatk-1.0-0.dll -> D:\123\dist
copying D:\GTK\bin\libgdk_pixbuf-2.0-0.dll -> D:\123\dist
copying D:\GTK\bin\libpangowin32-1.0-0.dll -> D:\123\dist
copying D:\GTK\bin\libgmodule-2.0-0.dll -> D:\123\dist
copying D:\GTK\bin\intl.dll -> D:\123\dist
copying D:\GTK\bin\libgtk-win32-2.0-0.dll -> D:\123\dist
copying d:\python24\w9xpopen.exe -> D:\123\dist
copying D:\GTK\bin\libglib-2.0-0.dll -> D:\123\dist
copying D:\GTK\bin\libpango-1.0-0.dll -> D:\123\dist
setting sys.winver for 'D:\123\dist\python24.dll' to 'py2exe'
copying d:\python24\lib\site-packages\py2exe\run.exe -> D:\123\dist\a.exe
The following modules appear to be missing
['gdk', 'ltihooks']

D:\123>cd dist

D:\123\dist>a
Traceback (most recent call last):
  File "a.py", line 6, in ?
  File "pygtk.pyc", line 73, in require
AssertionError: required version '2.0' not found on system

D:\123\dist>
我该怎么办呢?
我用的都是默认安装,如何扩展相关的模块呢?
谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-5 21:59 , Processed in 0.036960 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表