473,224 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

freeze.py builds, but binary doesn't even run locally (shared GTK problem?)

keherman@ibmlnx20:/tmp$ cat helloworld.py

#!/usr/bin/env python

import pygtk


import gtk

class HelloWorld:

def __init__(self):

self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)


def main(self):


if __name__ == "__main__":

hello = HelloWorld()



Name File

---- ----

m BaseHTTPServer /usr/lib/python2.4/BaseHTTPServer.py

m FixTk /usr/lib/python2.4/lib-tk/FixTk.py

m SocketServer /usr/lib/python2.4/SocketServer.py

m StringIO /usr/lib/python2.4/StringIO.py

m Tkconstants /usr/lib/python2.4/lib-tk/Tkconstants.py

m Tkinter /usr/lib/python2.4/lib-tk/Tkinter.py

m UserDict /usr/lib/python2.4/UserDict.py

m __builtin__

m __main__ helloworld.py

m _codecs

m _locale /usr/lib/python2.4/lib-dynload/_locale.so

m _random /usr/lib/python2.4/lib-dynload/_random.so

m _socket /usr/lib/python2.4/lib-dynload/_socket.so

m _sre

m _ssl /usr/lib/python2.4/lib-dynload/_ssl.so

m _threading_local /usr/lib/python2.4/_threading_local.py

m _tkinter /usr/lib/python2.4/lib-dynload/_tkinter.so

m array /usr/lib/python2.4/lib-dynload/array.so

m atexit /usr/lib/python2.4/atexit.py

m base64 /usr/lib/python2.4/base64.py

m binascii /usr/lib/python2.4/lib-dynload/binascii.so

m cStringIO /usr/lib/python2.4/lib-dynload/cStringIO.so

m codecs /usr/lib/python2.4/codecs.py

m collections

m copy /usr/lib/python2.4/copy.py

m copy_reg /usr/lib/python2.4/copy_reg.py

m dis /usr/lib/python2.4/dis.py

P distutils /usr/lib/python2.4/distutils/__init__.py

m distutils.dep_util /usr/lib/python2.4/distutils/dep_util.py

m distutils.errors /usr/lib/python2.4/distutils/errors.py

m distutils.log /usr/lib/python2.4/distutils/log.py

m distutils.spawn /usr/lib/python2.4/distutils/spawn.py

m distutils.util /usr/lib/python2.4/distutils/util.py

m dummy_thread /usr/lib/python2.4/dummy_thread.py

P email /usr/lib/python2.4/email/__init__.py

m email.Charset /usr/lib/python2.4/email/Charset.py

m email.Encoders /usr/lib/python2.4/email/Encoders.py

m email.Errors /usr/lib/python2.4/email/Errors.py

m email.FeedParser /usr/lib/python2.4/email/FeedParser.py

m email.Generator /usr/lib/python2.4/email/Generator.py

m email.Header /usr/lib/python2.4/email/Header.py

m email.Iterators /usr/lib/python2.4/email/Iterators.py

m email.Message /usr/lib/python2.4/email/Message.py

m email.Parser /usr/lib/python2.4/email/Parser.py

m email.Utils /usr/lib/python2.4/email/Utils.py

m email._parseaddr /usr/lib/python2.4/email/_parseaddr.py

m email.base64MIME /usr/lib/python2.4/email/base64MIME.py

m email.quopriMIME /usr/lib/python2.4/email/quopriMIME.py

P encodings /usr/lib/python2.4/encodings/__init__.py

m encodings.aliases /usr/lib/python2.4/encodings/aliases.py

m errno

m exceptions

m fcntl /usr/lib/python2.4/lib-dynload/fcntl.so

m fnmatch /usr/lib/python2.4/fnmatch.py

m formatter /usr/lib/python2.4/formatter.py

m ftplib /usr/lib/python2.4/ftplib.py

m getopt /usr/lib/python2.4/getopt.py

m getpass /usr/lib/python2.4/getpass.py

m glob /usr/lib/python2.4/glob.py

m gobject

m gopherlib /usr/lib/python2.4/gopherlib.py

P gtk

m gtk._gtk

m gtk.keysyms

m htmlentitydefs /usr/lib/python2.4/htmlentitydefs.py

m htmllib /usr/lib/python2.4/htmllib.py

m httplib /usr/lib/python2.4/httplib.py

m imp

m inspect /usr/lib/python2.4/inspect.py

m itertools /usr/lib/python2.4/lib-dynload/itertools.so

m linecache /usr/lib/python2.4/linecache.py

m locale /usr/lib/python2.4/locale.py

m macpath /usr/lib/python2.4/macpath.py

m macurl2path /usr/lib/python2.4/macurl2path.py

m markupbase /usr/lib/python2.4/markupbase.py

m marshal

m math /usr/lib/python2.4/lib-dynload/math.so

m mimetools /usr/lib/python2.4/mimetools.py

m mimetypes /usr/lib/python2.4/mimetypes.py

m ntpath /usr/lib/python2.4/ntpath.py

m nturl2path /usr/lib/python2.4/nturl2path.py

m opcode /usr/lib/python2.4/opcode.py

m os /usr/lib/python2.4/os.py

m os2emxpath /usr/lib/python2.4/os2emxpath.py

m popen2 /usr/lib/python2.4/popen2.py

m posix

m posixpath /usr/lib/python2.4/posixpath.py

m pwd /usr/lib/python2.4/lib-dynload/pwd.so

m py_compile /usr/lib/python2.4/py_compile.py

m pydoc /usr/lib/python2.4/pydoc.py

m pygtk /usr/lib/python2.4/site-packages/pygtk.py

m quopri /usr/lib/python2.4/quopri.py

m random /usr/lib/python2.4/random.py

m re /usr/lib/python2.4/re.py

m repr /usr/lib/python2.4/repr.py

m rfc822 /usr/lib/python2.4/rfc822.py

m select /usr/lib/python2.4/lib-dynload/select.so

m sgmllib /usr/lib/python2.4/sgmllib.py

m site /usr/lib/python2.4/site.py

m socket /usr/lib/python2.4/socket.py

m sre /usr/lib/python2.4/sre.py

m sre_compile /usr/lib/python2.4/sre_compile.py

m sre_constants /usr/lib/python2.4/sre_constants.py

m sre_parse /usr/lib/python2.4/sre_parse.py

m stat /usr/lib/python2.4/stat.py

m string /usr/lib/python2.4/string.py

m strop /usr/lib/python2.4/lib-dynload/strop.so

m struct /usr/lib/python2.4/lib-dynload/struct.so

m sys

m tempfile /usr/lib/python2.4/tempfile.py

m termios /usr/lib/python2.4/lib-dynload/termios.so

m thread

m threading /usr/lib/python2.4/threading.py

m time /usr/lib/python2.4/lib-dynload/time.so

m token /usr/lib/python2.4/token.py

m tokenize /usr/lib/python2.4/tokenize.py

m traceback /usr/lib/python2.4/traceback.py

m tty /usr/lib/python2.4/tty.py

m types /usr/lib/python2.4/types.py

m urllib /usr/lib/python2.4/urllib.py

m urlparse /usr/lib/python2.4/urlparse.py

m uu /usr/lib/python2.4/uu.py

m warnings /usr/lib/python2.4/warnings.py

m webbrowser /usr/lib/python2.4/webbrowser.py

Missing modules:

? Carbon.File imported from macpath

? Carbon.Folder imported from tempfile

? Carbon.Folders imported from tempfile

? EasyDialogs imported from getpass

? MacOS imported from Tkinter, py_compile

? SOCKS imported from ftplib

? _emx_link imported from os

? _winreg imported from urllib

? ce imported from os

? gdk imported from gtk

? ic imported from pydoc, urllib, webbrowser

? ltihooks imported from gtk

? mac imported from os

? msvcrt imported from getpass

? nt imported from ntpath, os

? org.python.core imported from copy

? os.path imported from os

? os2 imported from os

? riscos imported from os

? riscosenviron imported from os

? riscospath imported from os

? rourl2path imported from urllib

? sitecustomize imported from site

freezing BaseHTTPServer ...

freezing FixTk ...

freezing SocketServer ...

freezing StringIO ...

freezing Tkconstants ...

freezing Tkinter ...

freezing UserDict ...

freezing __main__ ...

freezing _threading_local ...

freezing atexit ...

freezing base64 ...

freezing codecs ...

freezing copy ...

freezing copy_reg ...

freezing dis ...

freezing distutils ...

freezing distutils.dep_util ...

freezing distutils.errors ...

freezing distutils.log ...

freezing distutils.spawn ...

freezing distutils.util ...

freezing dummy_thread ...

freezing email ...

freezing email.Charset ...

freezing email.Encoders ...

freezing email.Errors ...

freezing email.FeedParser ...

freezing email.Generator ...

freezing email.Header ...

freezing email.Iterators ...

freezing email.Message ...

freezing email.Parser ...

freezing email.Utils ...

freezing email._parseaddr ...

freezing email.base64MIME ...

freezing email.quopriMIME ...

freezing encodings ...

freezing encodings.aliases ...

freezing fnmatch ...

freezing formatter ...

freezing ftplib ...

freezing getopt ...

freezing getpass ...

freezing glob ...

freezing gopherlib ...

freezing gtk ...

freezing gtk.keysyms ...

freezing htmlentitydefs ...

freezing htmllib ...

freezing httplib ...

freezing inspect ...

freezing linecache ...

freezing locale ...

freezing macpath ...

freezing macurl2path ...

freezing markupbase ...

freezing mimetools ...

freezing mimetypes ...

freezing ntpath ...

freezing nturl2path ...

freezing opcode ...

freezing os ...

freezing os2emxpath ...

freezing popen2 ...

freezing posixpath ...

freezing py_compile ...

freezing pydoc ...

freezing pygtk ...

freezing quopri ...

freezing random ...

freezing re ...

freezing repr ...

freezing rfc822 ...

freezing sgmllib ...

freezing site ...

freezing socket ...

freezing sre ...

freezing sre_compile ...

freezing sre_constants ...

freezing sre_parse ...

freezing stat ...

freezing string ...

freezing tempfile ...

freezing threading ...

freezing token ...

freezing tokenize ...

freezing traceback ...

freezing tty ...

freezing types ...

freezing urllib ...

freezing urlparse ...

freezing uu ...

freezing warnings ...

freezing webbrowser ...

generating table of frozen modules

Warning: unknown modules remain: _locale _random _socket _ssl _tkinter
array binascii cStringIO collections fcntl gobject gtk._gtk itertools
math pwd select strop struct termios time

Now run "make" to build the target: helloworld

keherman@ibmlnx20:/tmp$ make

gcc -pthread -Xlinker -export-dynamic config.o frozen.o
M_BaseHTTPServer.o M_FixTk.o M_SocketServer.o M_StringIO.o
M_Tkconstants.o M_Tkinter.o M_UserDict.o M___main__.o
M__threading_local.o M_atexit.o M_base64.o M_codecs.o M_copy.o
M_copy_reg.o M_dis.o M_distutils.o M_distutils__dep_util.o
M_distutils__errors.o M_distutils__log.o M_distutils__spawn.o
M_distutils__util.o M_dummy_thread.o M_email.o M_email__Charset.o
M_email__Encoders.o M_email__Errors.o M_email__FeedParser.o
M_email__Generator.o M_email__Header.o M_email__Iterators.o
M_email__Message.o M_email__Parser.o M_email__Utils.o
M_email___parseaddr.o M_email__base64MIME.o M_email__quopriMIME.o
M_encodings.o M_encodings__aliases.o M_fnmatch.o M_formatter.o
M_ftplib.o M_getopt.o M_getpass.o M_glob.o M_gopherlib.o M_gtk.o
M_gtk__keysyms.o M_htmlentitydefs.o M_htmllib.o M_httplib.o M_inspect.o
M_linecache.o M_locale.o M_macpath.o M_macurl2path.o M_markupbase.o
M_mimetools.o M_mimetypes.o M_ntpath.o M_nturl2path.o M_opcode.o M_os.o
M_os2emxpath.o M_popen2.o M_posixpath.o M_py_compile.o M_pydoc.o
M_pygtk.o M_quopri.o M_random.o M_re.o M_repr.o M_rfc822.o M_sgmllib.o
M_site.o M_socket.o M_sre.o M_sre_compile.o M_sre_constants.o
M_sre_parse.o M_stat.o M_string.o M_tempfile.o M_threading.o M_token.o
M_tokenize.o M_traceback.o M_tty.o M_types.o M_urllib.o M_urlparse.o
M_uu.o M_warnings.o M_webbrowser.o
/usr/lib/python2.4/config/libpython2.4.a -lpthread -ldl -lutil -lm
-o helloworld

/usr/lib/python2.4/config/libpython2.4.a(posixmodule.o): In function

: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'

/usr/lib/python2.4/config/libpython2.4.a(posixmodule.o): In function

: warning: the use of `tempnam' is dangerous, better use `mkstemp'

keherman@ibmlnx20:/tmp$ ./helloworld

Traceback (most recent call last):

File "helloworld.py", line 5, in ?

import gtk

File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line
37, in ?

from _gtk import *

ImportError: No module named _gtk

Apr 8 '06 #1
1 2444
kr****************@gmail.com wrote:
from _gtk import *

ImportError: No module named _gtk

If you look at the freeze output, you'll notice that _gtk is
not linked into your application: It is a shared library (.so),
so it can't be frozen.

Instead, the resulting binary will look for _gtk.so on sys.path.
Try copying _gtk.so into the directory where the binary is,
or set PYTHONPATH before running the binary.

If you want to freeze _gtk into the application, you need it as
a static library.

Apr 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Steven T. Hatton | last post by: Type ios_base::openmode Says this about the std::ios::binary openmode flag: *binary*: perform input and output in binary mode (as opposed to text mode) And that is basically _all_ it...
by: kristian.hermansen | last post by:
After freezing a PYGTK app, I am unable to run it. It this a common problem, because I could not find any documentation on it at all. I tried freezing this example, which gets by the make as...
by: pinkfloydhomer | last post by:
Using rand() in and old version og gcc, and using Tausworth's method, I calculated the frequency of 0 or 1 in the first digit like this: int hist = {0,0}; for (i = 0; i < 100000; ++i) {...
by: guy.flowers | last post by:
Hi Have a problem, Ill give some history to the problem and add a little example code to start with to see if anybody can help or if I am correct in what the problem is. I have been looking...
by: jmalone | last post by:
I have a python script that I need to freeze on AIX 5.1 (customer has AIX and does not want to install Python). The python script is pretty simple (the only things it imports are sys and socket)....
by: Flyzone | last post by:
Hi, i need to "compile" a python source (2.3.6) to make it standalone on Solaris 9. I get this warning on freezing my source: "Warning: unknown modules remain: _locale _random _socket array...
by: jm.suresh | last post by:
I am trying to use freeze to create a single binary executable for one of my program. When I run freeze, it runs fine with the following modules. These modules are available in the dyn-load...
by: Erwin Moller | last post by:
Why is a binary file executable? Is any binary file executable? Is only binary file executable? Are all executable files binary? What is the connection between the attribute of binary and that of...
by: itdevries | last post by:
Hi, I'm trying to convert some char data I read from a binary file (using ifstream) to a float type. I've managed to convert the int types but now I need to do the float types as well but it...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.