cxfreeze on ubuntu 9.10

W

Waspinator

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
 
S

Sandy

I used cxFreeze without any problem on Ubuntu 9.10 32 bit version. I
tried it on a wxPython gui script and
it works fine though I did'n use any setup file.
Just try cxFreeze executable (should be in /usr/bin/) instead of setup
file.

$/usr/bin/cxFreeze my_script.py --target-dir=/what_ever_dir/

what_ever_dir will have the executable file and other libraries needed
to run the executable.

- dksr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top