|
Re: py2exe: msg#00172python.pygame
D. Hartley wrote: Hello, everyone! These are my own notes on the subject: In the main Python directory, run: python setup.py py2exe Where setup.py consists of: # setup.py from distutils.core import setup import py2exe setup(console=["MyProgram.py"]) And where all your .py files are in the main Python directory itself. Mysterious errors I've seen: -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. ----- I don't use any fancy setup.py for Pygame projects. I just build the EXE, then transfer any relevant media files to the Dist directory manually. Have you tried building a minimal Pygame program (eg. "import pygame; pygame.init(); print "Foo!") into an EXE? Kris |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | py2exe: 00172, D. Hartley |
|---|---|
| Next by Date: | Re: py2exe: 00172, D. Hartley |
| Previous by Thread: | py2exei: 00172, D. Hartley |
| Next by Thread: | Re: py2exe: 00172, D. Hartley |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |