470,581 Members | 2,433 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,581 developers. It's quick & easy.

Problem using py2exe

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.

Thanks,

Sarah
Jul 18 '05 #1
4 2403
"Sarah Mount" <s.***********@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
Jul 18 '05 #2

"Thomas Heller" <th*****@python.net> wrote in message
news:ma************************************@python .org...
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'.


Thanks Thomas, but sadly --packages didn't make any difference :-(

Installing pyObjc seems impossible on Windows as ffi support is missing
(doesn't wok with ctypes either) and py2exe isn't available for Linux!

:-(

Thanks anyway,

Sarah
Jul 18 '05 #3
"Sarah Mount" <s.***********@REALLYNOSPAMcoventry.ac.uk> writes:
"Thomas Heller" <th*****@python.net> wrote in message
news:ma************************************@python .org...
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'.


Thanks Thomas, but sadly --packages didn't make any difference :-(

Installing pyObjc seems impossible on Windows as ffi support is missing
(doesn't wok with ctypes either) and py2exe isn't available for Linux!


Now you've lost me. What has pyObjc and ctypes to do with pygame?

Confused,

Thomas
Jul 18 '05 #4

"Thomas Heller" <th*****@python.net> wrote in message
news:ma************************************@python .org...
"Sarah Mount" <s.***********@REALLYNOSPAMcoventry.ac.uk> writes:
"Thomas Heller" <th*****@python.net> wrote in message
news:ma************************************@python .org...
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'.


Thanks Thomas, but sadly --packages didn't make any difference :-(

Installing pyObjc seems impossible on Windows as ffi support is missing
(doesn't wok with ctypes either) and py2exe isn't available for Linux!


Now you've lost me. What has pyObjc and ctypes to do with pygame?


Sorry. The packages that are missing are "AppKit, objc, Foundation".
Googling for these, they seem to be part of pyObjc, which can't be
installed without libffi.

HTH,

Sarah
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by RJS | last post: by
5 posts views Thread by Rene Olsthoorn | last post: by
reply views Thread by bapeterson | last post: by
5 posts views Thread by Lad | last post: by
4 posts views Thread by bwaha | last post: by
6 posts views Thread by Michele Petrazzo | last post: by
1 post views Thread by Dave Lim | last post: by
5 posts views Thread by msunderwd | last post: by
3 posts views Thread by Kevin | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.