Problem using py2exe

Thomas Heller theller at python.net
Mon Mar 22 11:38:18 EST 2004


"Sarah Mount" <s.mountNOSPAM at REALLYNOSPAMcoventry.ac.uk> writes:

> Hi everyone.
>
> I'm trying to create an exe for a simple pygame app on Win XP.
> I think I've got the latest (python, py2exe, pygame) and my setup.py
> file looks like this:
>
> | from distutils.core import setup
> | import glob
> | import py2exe
> |
> | setup(name='pyDemo',
> |      windows=["pyDemo.py"],
> |      data_files=[("data",
> |                     ["images/sensor.png", "images/start.png"])]
> | )
>
> Simple, eh? Well, all runs well, except for the following error:
>
> | The following modules appear to be missing
> | ['AppKit', 'Foundation', 'objc']
>
> Since pyDemo doesn't use any of these libraries, I just ignored that.
>
> When I try to run pyDemo.exe, I get the following error report from
> the MS Visual C++ Runtime Library:
>
> | Runtime error!
> | Program: C:\mypath\pyDemo.exe
> | This application has requestion the Runtime to terminate it in an unusual way.
> | Please contact the application's support team for more information.
>
> Eeek! I've no idea where to go from here, so if anyone can help that
> would be fantastic.

IIRC, pygame imports some of its modules from C code, and py2exe cannot
track these.  You should try to include some (or all) of the pygame
modules explicitely with the --includes command line option.  Or you
simply include the whole pygame package with '--packages pygame'.

HTH,

Thomas





More information about the Python-list mailing list