cxfreeze on ubuntu 9.10

Waspinator patrickwasp at gmail.com
Wed Mar 24 20:33:35 EDT 2010


Hi,

I'm trying to compile a python script on Ubuntu 9.10. It uses the gtk
toolkit. I tried to run GUI2EXE for a cxfreeze gui, but even after
installing wxPython in synaptic it still complains about not having
it.

I also tried to use cxfreeze by itself but the file it produces does
not run.

I tried to follow the information at http://cx-freeze.sourceforge.net/cx_Freeze.html

I created a setup.py file that looks like this (from the page)

from cx_Freeze import setup, Executable

setup(
        name = "gtk_test",
        version = "0.1",
        description = "gtk_test",
        executables = [Executable("gtk_test.py")])

and ran:

python setup.py build


When I try to run the executable I get the following error:

../build/exe.linux-i686-2.6/library.zip/gtk/_gtk.py:12:
RuntimeWarning: tp_compare didn't return -1 or -2 for exception
ImportError: could not import gio
ImportError: could not import gio
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/cx_Freeze/initscripts/
Console.py", line 29, in <module>
    exec code in m.__dict__
  File "gtk_test.py", line 274, in <module>
  File "gtk_test.py", line 228, in main
AttributeError: 'module' object has no attribute 'Window'

I was thinking of using the 'copy-dependent-files' option but I'm not
sure how.

Any ideas?

Thanks



More information about the Python-list mailing list