By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,496 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

Problem using py2exe

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
"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

P: n/a

"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

P: n/a
"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

P: n/a

"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.