使用pyins打包pygtk应用程序

2024-09-27 22:20:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我想创建一个pygtk应用程序的可执行文件,让它在任何机器上运行,而不需要安装软件包。在

我试着用pyinstaller。但是,当我在不同的机器上运行时,得到以下错误和文本在GUI中看起来就像方形框

/tmp/_MEIwDbvRA/User.py:88: GtkWarning: Cannot open pixbuf loader module file '/home /arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
/tmp/_MEIwDbvRA/User.py:197: PangoWarning: No modules found:
No builtin or dynamically loaded modules were found.
PangoFc will not work correctly.
This probably means there was an error in the creation of:
   '/home/arrowdevices/pda/etc/pango/pango.modules'
You should create this file by running:
  pango-querymodules > '/home/arrowdevices/pda/etc/pango/pango.modules'
Fontconfig warning: "/etc/fonts/conf.d/11-lcd-filter-lcddefault.conf", line 9: invalid constant used : lcddefault
Fontconfig warning: "/etc/fonts/conf.d/53-monospace-lcd-filter.conf", line 17: invalid constant used : lcdlegacy
/tmp/_MEIwDbvRA/User.py:197: PangoWarning: failed to find shape engine, expect ugly output. engine-type='PangoRenderFc', script='latin'
/tmp/_MEIwDbvRA/User.py:197: PangoWarning: failed to find shape engine, expect ugly output. engine-type='PangoRenderFc', script='common'
/tmp/_MEIwDbvRA/User.py:197: GtkWarning: Cannot open pixbuf loader module file '/home/arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

我的问题:

  1. PyGTI安装程序如何单独使用步骤创建PyGTI应用程序?

  2. 如何将应用程序中使用的所有图像/字体与应用程序捆绑在一起?

注意:我已经安装了gtk和pygtk包(具有依赖关系-glib、atk、cairo、pango、pycairo、pygobject、gdk-pixbuf),方法是使用python2.7将源代码编译到本地目录。在


Tags: nopymodules应用程序homeconfetctmp

热门问题