February 7th, 2004, 03:47 AM
py2exe problem again..
Hi there. Yes I am new to Python, and yes I have looked at every forum reply inhere with the name py2exe in it---
I have been trying to figure the damn py2exe thing out.
I use a script that pygames have written
But Why doesn it work on my comp? All the command line says is ---force not recognized, --console not recognized etc..
is there some library I must download for that to work?
February 7th, 2004, 06:12 AM
Mmmm, it could be a problem with versions. Pygame2exe appears to have been setup for py2exe 0.3.1 and since were now on 0.5 theres a bit of a difference.
you getting any error messages?
February 7th, 2004, 07:28 AM
well I am getting all kind of weird messages if i change here and there
but here is what I get if I only change what I'm supposed to (the py file name etc)
Traceback (most recent call last):
File "D:\Program\Python\pygame2exe.py", line 53, in -toplevel-
File "D:\Program\Python\lib\distutils\core.py", line 137, in setup
raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
SystemExit: usage: pygame2exe.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: pygame2exe.py --help [cmd1 cmd2 ...]
or: pygame2exe.py --help-commands
or: pygame2exe.py cmd --help
error: option --force not recognized
February 7th, 2004, 06:38 PM
Ok, by the looks of things the pygame2exe packange isnt calling py2exe as is expected. What versions of python, pygame and py2exe do you have?
February 7th, 2004, 06:42 PM
i use (what i think) is the latest of them all.
February 7th, 2004, 06:55 PM
The latest version of Pythoin is actually 2.3.3, which you can find at http://www.python.org... this is also required for py2exe 0.5.0 to work properly so i sugest you upgrade you're Python version!
I'm thinking the problem is that pygame2exe was writen to run with py2exe 0.3.1. And thats a huge gap as programs go.
February 7th, 2004, 07:02 PM
ok I shall go and look for the 2.3.3
but do you have some tip where to go for finding a similar script to the pygame2exe, because it looked to be so neat =)
February 7th, 2004, 07:47 PM
February 8th, 2004, 03:44 PM
I agree with Netyan, the problem is likely to be the script pygame2exe.py not working the way py2exe 0.5 expects.
py2exe .5 does not like command line arguments like --force. Your best bet is to check out the py2exe wiki and compare your script with the recommendations there. (It looks like you need to provide the 'includes' item.)
Your other option would be to get hold of the older versions of python and py2exe - but that would not be as much fun
February 8th, 2004, 04:28 PM
hehe ok thanx for all your help, I have now skipped the pygame2exe and just put together a simple little setup.py
But hehe this is embarrasing, the script work and i get a folder with an library.zip, some dll file and a w9xpopen.exe file etc, but no .exe file to the program I built..
I guess there is something I have to do now to be able to open the progg as an exe but I cant figure it out.
sorry if Im not getting this right away
February 8th, 2004, 06:08 PM
You need a windows or console entry to actually create the .exe.
February 8th, 2004, 07:07 PM
yeah thnx for the windows tip
Now i actually get an exe and the prog starts but crashes right away :/
here is what it says when running setup.py:
The following modules appear to be missing
['AppKit', 'Foundation', 'objc']
and here is what the program say when its crashing
This application has requested the Runtime to terminate in an unusual way. bla bla bla
is that because of the missing modules? and how do i get the modules?
February 8th, 2004, 08:03 PM
I am guessing here:
the --force command of the old script will specify these modules and forces py2exe to include them in the compilation.
If these files are the same as the ones you report then add the them into the includes statement of the script. If not try it anyway.
Don't know the application, but it is always possible that pygame breaks in python 2.3. You may yet have to downgrade the python etc to match its known working conditions.
February 8th, 2004, 08:09 PM
You can tell py2exe what do include by using the -i flag. for more help on py2exe options use the -h flag. Anyway heres a small example useing -i...
Note: Alot the the previous options appear to have been disolved in py2exe 0.5.0 so --force or -f will give you a usage error. This seems to have been replaced by -i but dont ask me why
Give it a go .
Last edited by netytan; February 8th, 2004 at 08:19 PM.
February 9th, 2004, 04:02 AM
ok, I've tried to manually include the Appkit that it says is missing etc with the -i command and I've tried the most there is. I have googled for atleast 3 hours trying to find others importing the Appkit, but they just do:
from AppKit import *
but I dont seem to have the module at all. And the closest I can get to it via google is that it exists in some PyObjs class for Macintosh.
any clue on this?