Cedric Gustin said: > At 06:17 PM 9/3/2003 -0400, Charles Lepple wrote: [...] >>AssertionError: required version '2.0' not found on system >> >>... which is probably a result of calling pygtk.require('2.0'). > > Right, py2exe does not like it, as your final executable does not know > what sys.path and sys.modules contain.
So pygtk.require() is more to ensure that the version of pygtk is 2.0 (well, 1.99.x, I guess) than to select GTK+ 2? > Just get rid of it and it should work. At least py2exe works for me on the > glade example (glade-demo.py). Just make sure that py2exe does not include > the GTK+ DLLs (except libglade-2.0.dll and libxml2.dll) and ask your final > users to install the dropline GTK+ distribution instead. This is where it gets a little fuzzy. When you say "make sure it does not include the DLLs", should I use '--excludes=' on the command line, or should I do this manually? (Jamey Cribbs' post, which suggests an alternate method-- namely, incorporating all of the GTK+ libraries and data files into the dist directory-- made me wonder if I'm doing this part correctly.) Also, digging further into this revealed that I may not be handling the path correctly (to locate the GTK+ DLLs). Here's an excerpt of my gtk_path.py module (based heavily on code from the PyGTK FAQ): import _winreg, msvcrt, sys k = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "Software\\GTK\\2.0") os.environ['PATH'] = "%s\\lib;%s\\bin;%s\\DLLs;%s" \ % (gtkdir[0], gtkdir[0], sys.prefix, os.environ['PATH']) I import this in setup.py so that py2exe can find the DLLs when importing pygtk. py2exe won't this value of PATH in my final executable, will it? Also, is setup.py where I should import modules such as pango and atk (considering that I don't reference them directly anywhere else)? Thanks to all of you who have helped out so far. -- Charles Lepple <[EMAIL PROTECTED]> http://www.ghz.cc/charles/ _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/