[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Py2exe: Errors Stomped



For anyone experiencing the fun of writing a working Python/Pygame
program, Py2exe can be an excruciating way to share it with others. You
may find that like the singing frog, your program suddenly won't work when
taken out of its IDLE box and put on display as an EXE.

Here are several errors I've encountered, and how they can be slain.

-On running Py2exe, "The following modules appear to be missing:
Foundation, dotblas, objc." These don't seem to matter; I think they're
only used on Macs. Solution: Ignore.
-Run-time error: Invalid Tcl version, eg: "Version conflict -- have 8.4,
need 8.3." In this case the user had a programming language called Ruby
installed, which apparently jam's Tkinter, Python's version of/interface
to Tk, an interface system. (By the way, Python's IDE, IDLE, is itself
written in Tkinter, which can cause annoying problems in itself when
working with Tkinter.) Solution: Delete Ruby.
-Run-time error: Something about fonts. Voodoo solution: Find
"FREESANSBOLD.TTF" in your Windows directory and copy it into the dist
directory.
-Run-time error: Segmentation fault involving Pygame's "sndarray.pyc."
Solution: Destroy Python's "dist" and "build" directories, which probably
are being used to load all sorts of gunk from other programs you've
written into this EXE and somehow interfering with it.
-Run-time error: Can't load file. If you have media like graphics and
music, make sure they're all there in the dist directory with whatever
directory structure you tested the program in.

Kris