Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Norrköping, Sweden
    Posts
    9
    Rep Power
    0

    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
    http://pygame.seul.org/ftp/pygame2exe.py

    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?
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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?

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Norrköping, Sweden
    Posts
    9
    Rep Power
    0
    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-
    setup(name=project_name, scripts=[script])
    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
  6. #4
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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?

    Mark.
    programming language development: www.netytan.com Hula

  8. #5
  9. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Norrköping, Sweden
    Posts
    9
    Rep Power
    0
    i use (what i think) is the latest of them all.

    Python 2.3
    pygame-1.6
    py2exe-0.5.0
  10. #6
  11. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.

    Mark.
    programming language development: www.netytan.com Hula

  12. #7
  13. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Norrköping, Sweden
    Posts
    9
    Rep Power
    0
    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 =)
  14. #8
  15. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Couldn't find anythings like pygame2exe on google... perhaps you should read though the mexecuatble tutorial in the pygame docs:

    http://www.pygame.org/docs/tut/Executable.html

    Mark.
    programming language development: www.netytan.com Hula

  16. #9
  17. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    dude,

    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

    cheers,
    Grim
  18. #10
  19. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Norrköping, Sweden
    Posts
    9
    Rep Power
    0
    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
  20. #11
  21. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    dude,

    You need a windows or console entry to actually create the .exe.

    Happy hacking,
    Grim
  22. #12
  23. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Norrköping, Sweden
    Posts
    9
    Rep Power
    0
    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
    Runtime Error!

    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?
  24. #13
  25. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    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.

    Cheers,
    Grim
  26. #14
  27. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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...

    C:\Documents and Settings\Mark\Desktop>python setup.py py2exe -i modules, to, include
    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 .

    Mark.
    Last edited by netytan; February 8th, 2004 at 07:19 PM.
    programming language development: www.netytan.com Hula

  28. #15
  29. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Norrköping, Sweden
    Posts
    9
    Rep Power
    0
    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?

Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo