473,587 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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='pyD emo',
| 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\pyDem o.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 2531
"Sarah Mount" <s.***********@ REALLYNOSPAMcov entry.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='pyD emo',
| 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\pyDem o.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******** *************** *************@p ython.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.***********@ REALLYNOSPAMcov entry.ac.uk> writes:
"Thomas Heller" <th*****@python .net> wrote in message
news:ma******** *************** *************@p ython.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******** *************** *************@p ython.org...
"Sarah Mount" <s.***********@ REALLYNOSPAMcov entry.ac.uk> writes:
"Thomas Heller" <th*****@python .net> wrote in message
news:ma******** *************** *************@p ython.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2979
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out "import numarray" allows the exe to run. Left in, I get "4.exe has generated errors" etc. I'm going around and around and there isn't much on Google. py2exe output is last.
1
3862
by: Marc | last post by:
Hello, I've fiddled with this for quite a while and thought I had the problem solved. I had a version that would successfully compile and run. But then I had to change the code to use a different module, and now it will compile but not run again. I know that functionality in this area is not fully supported yet, but there has to be someone out there that has got this to work. I am using Python2.3, with py2exe 0.4.2, and win32all 159....
5
4014
by: Rene Olsthoorn | last post by:
Dear readers, py2exe has a problem including libxml2. Not at building time, but at runtime. The libxml2.dll cannot be loaded... Is there anyone that NOT has the problem? (and can you drop me your setup.py scipt, please). Thanks in advance, Rene O.
0
1382
by: bapeterson | last post by:
I'd like to use PY2EXE to "compile" a program using the VPYTHON module (www.vpython.org). I have an example where this was previously done to the demo script: Hanoi.py (a towers of Hanoi demo) a couple of years back. When I try and duplicate this I get the following warnings of missing modules: warning: py2exe: ********************************** warning: py2exe: * The following modules were not found: warning: py2exe: * Carbon.Folder
5
2612
by: Lad | last post by:
I try to make an exe file from my script with help of Py2exe but I am not successfull. I have my script start.py that has only one command ############### import rgs.py ############## (rgs.py is the real program.)
4
3995
by: bwaha | last post by:
First time trying to create an executable with py2exe. I have a small program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'), matplotlib ('0.83.2'), win32com (latest?), Numeric ('23.7') on Windows XP & Win2000. The program runs without problem but as an exe it doesn't even get to showing the GUI. I get the following error log when I run the executable. Traceback (most recent call last): File "mpival3.py", line 1264, in ?
6
2217
by: Michele Petrazzo | last post by:
Hi list, just found in this moment that my applications stop to work with win xp and receive this error: """ This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. """ (Note that the same application with
1
2343
by: Dave Lim | last post by:
>On May 3, 1:29 pm, Dave Lim <diband... at yahoo.com> wrote: site:http://surguy.net/articles/speechrecognition.xml used out tried ? to protection aroundhttp://mail.yahoo.com I went and
5
3428
by: msunderwd | last post by:
Having a problem with "compiling" a Tkinter/python program using py2exe (and pyinstaller, for that matter)... I have several dialogs that are derived from the tkSimpleDialog.Dialog class. These work just fine if run through the interpreter. When I "compile" this with py2exe, I don't see any errors, and when I execute the resulting program, it "appears" to work fine until I invoke one of the derived dialogs. Then, I get the "body" of...
3
1965
by: Kevin | last post by:
Hi everyone, I'm running Python 2.5.1 on an XP-Pro platform, with all the updates (SP2, etc) installed. I have a program (send_file.py) that sends a file to a service provider, using an ftp connection. The program works properly, and I've created an 'exe' of it, using py2exe. It was distrubuted to my user base a couple of weeks ago and seems to be working well. None of the users have Python installed on their machines, thus the need...
0
7924
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.