473,387 Members | 1,882 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,387 software developers and data experts.

freeze.py and GTK apps

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 well, but
running it results in a failure. This is on Ubuntu Linux:
http://www.moeraki.com/pygtktutorial.../helloworld.py

$ ./helloworld
Traceback (most recent call last):
File "helloworld.py", line 7, 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

Any suggestions?
--
Kristian Hermansen

Mar 28 '06 #1
2 2127
On Mon, 2006-03-27 at 16:15 -0800, kr****************@gmail.com wrote:
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 well, but
running it results in a failure. This is on Ubuntu Linux:
http://www.moeraki.com/pygtktutorial.../helloworld.py

$ ./helloworld
Traceback (most recent call last):
File "helloworld.py", line 7, 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

Any suggestions?
--
Kristian Hermansen
From the freeze README


A warning about shared library modules
--------------------------------------

When your Python installation uses shared library modules such as
_tkinter.pyd, these will not be incorporated in the frozen program.
Again, the frozen program will work when you test it, but it won't
work when you ship it to a site without a Python installation.

Freeze prints a warning when this is the case at the end of the
freezing process:

Warning: unknown modules remain: ...

When this occurs, the best thing to do is usually to rebuild Python
using static linking only. Or use the approach described in the previous
section to declare a library path using sys.path, and place the modules
such as _tkinter.pyd there.

Same applies here ...

Mar 28 '06 #2
On 3/28/06, Adam DePrince <ad***********@gmail.com> wrote:
When your Python installation uses shared library modules such as
_tkinter.pyd, these will not be incorporated in the frozen program.
Again, the frozen program will work when you test it, but it won't
work when you ship it to a site without a Python installation.
No, it didn't even run!!! So, it won't run frozen on ANY system. The
_gtk import choked the whole program and it died with exit status ==
1. So, even though I did have the GTK libraries locally, the program
exited improperly. The unfrozen script ran fine, so isn't this a
different problem entirely?
Freeze prints a warning when this is the case at the end of the
freezing process:

Warning: unknown modules remain: ...

When this occurs, the best thing to do is usually to rebuild Python
using static linking only. Or use the approach described in the previous
section to declare a library path using sys.path, and place the modules
such as _tkinter.pyd there.

Same applies here ...


Well, what we want is a totally static frozen build, but if not
possible (GTK is huge right?), GTK is assumed to be on the target
machine. However, the frozen binary still doesn't run properly. Any
suggestions? Try freezing the example code yourself and running it,
perhaps I am doing something amazingly wrong here...
--
Kristian Hermansen
Mar 28 '06 #3

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

Similar topics

2
by: aww91 | last post by:
Company is planning a Sybase to UDB migration that is projected to take 1 year. During that long period of time any Code Freeze put into place would impact our users (we normally release code...
11
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each...
4
by: Roger Withnell | last post by:
I would like to freeze column and row headings on a webpage, simulating freeze panes as in an Excel spreadsheet. Don't seem to be able to do it with Frames. Is there a way with Javascript...
2
by: paraidy | last post by:
Hi all, i would to know how is possible to freeze another process from my application and unfreeze it, can someone help me? thx all.
1
by: kdpo1990 | last post by:
I've worked with ASP.NET apps. for a long time, but now, i have to figure out how to do same in win app. I need to find a way to lock or freeze table column in datagrid. This is a link to an...
1
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)....
1
by: Cameron Laird | last post by:
How is Freeze--freeze.py <URL: http://wiki.python.org/moin/Freeze >--packaged for Debian? *Is* it packaged for Debian?
4
by: ToxSox | last post by:
Hello. This is my first post here and i have a big problem with my script! One page (child.htm), was delivered not by me and i can't change it. This page calls a methode in a object of my page....
2
by: Gabriel Rossetti | last post by:
Hello everyone, I'm trying to use python's freeze utility but I'm running into problems. I called it like this : python /usr/share/doc/python2.5/examples/Tools/freeze/freeze.py...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.