将PyGTK转换为exe [英] Converting PyGTK to exe

查看:93
本文介绍了将PyGTK转换为exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看了几个小时了.对我来说唯一有意义的是 http://fnch.users.sourceforge.net/portablepygtkwindows. html 但是它占用了40MB以上的空间,对我来说太大了.

I've been looking around for hours now. The only thing that makes sense to me is http://fnch.users.sourceforge.net/portablepygtkwindows.html But it takes up >40MB of space and it is too big for me.

其他教程对我来说太复杂以至于无法通过它们,或者我获得的结果不起作用.

Other tutorials are either too complicated for me to go through them or the results I obtained didn't work.

我尝试过py2exe,但import gtk失败.

I've tried py2exe but the import gtk fails.

我尝试过pyinstaller.包含GTK文件,但不包含林间空文件.

I've tried pyinstaller. The GTK files were included but not the glade file.

我希望将其全部包含在一个独立的.exe中.但是,现在我的首要任务是使其在没有Python的Windows中正常运行.我们将竭尽所能提供帮助.

I would wish to have it all in a single standalone .exe. But now my priority is to have it properly working in windows without Python. Any effort to help is much appreciated.

推荐答案

关于 py2exe和pygtk的一些说明可用.您应该可以将整个程序放在一个exe文件中,但不能将GTK库复制到一个文件中.

Some instructions on py2exe and pygtk are available. You should be able to have your whole program in a single exe file, but not the GTK library, which will need to be copied:

完成后,您需要将etc,lib和共享目录从GTK +安装(不是pygtk安装)复制到创建的dist dir py2exe.

Once that's done, you'll need to copy the etc, lib and share directories from your GTK+ install (not the pygtk install) to the dist dir py2exe created.

您还可以将数据文件与pyinstaller .

这篇关于将PyGTK转换为exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆