Page 2 of 2 First 12
  • Jump to page:
    #16
  1. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Ok this might be a mood point but are you trying to make windows executables to run on Mac?

    One if the requirments of py2exe is that you have windows, actually surprised u got it installed if you're using . But it explain some things.

    If not, does the program run before you try and compile it?

    Mark
    programming language development: www.netytan.com Hula

  2. #17
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    dude,
    Looks like you might have to do a bit of searching. I'm not a Mac man but I found this topic helpful:
    Mac python Freeze - things may have changed. Any Mac users out there who know?

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

    Join Date
    Feb 2004
    Location
    Norrköping, Sweden
    Posts
    9
    Rep Power
    0
    haha, you guys sure misunderstood me.

    I am trying to get the exe to windows, nothing else.

    The Mac thing came up when i googled for Appkit, thats why I mentioned it.

    I really dont understand why py2exe says the modules are missing..or why they should be there at all..


    The program runs without a glitch when running it directly from python (before compiling)
  6. #19
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    hehhee sorry, that one was my fault i'm sure . Ok, so you don't use them modules anywhere in you're code? If not you can try telling py2exe not to include them using -e in the same way you did -i although i dont know if that will work.

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

  8. #20
  9. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    back on track, its windows.
    When I have this sort of problem I usually do a "Find in Files.." for the modules in question. This way you can see which modules use the problem file and how it has been imported. Can you post the specific import statements?
    Cheers,
    Grim
  10. #21
  11. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Norrköping, Sweden
    Posts
    9
    Rep Power
    0
    I've uploaded the script with this message so you can try it yourself, you will though need som images and sound if you wnna try.

    and here is the setup.py:

    I dont know if this is anything correct, but maybe you can se all the errors I've made hehe.

    import os, pygame
    from pygame.locals import *
    import winsound
    import py2exe


    from distutils.core import setup


    opts = {

    "py2exe": {
    "includes": "encodings, encodings.*",
    "dist_dir": "bin",
    "packages": ["encodings"],

    }
    }
    setup(

    windows = [
    {

    "name": "Virtua GR Battle",
    "script": "sla_apa.py",
    "options": "opts",
    "data_files": ("data",["data/tetris.wav","data/petter.bmp","data/whiff.wav","data/punch.wav","data/startup.wav","data/fist2.bmp",])


    }
    ],

    name=["Virtua GR Battle"],
    scripts=["sla_apa.py"],
    options=opts,
    data_files=[("data",["data/tetris.wav","data/petter.bmp","data/whiff.wav","data/punch.wav","data/startup.wav","data/fist2.bmp",])]



    )
    Attached Files
  12. #22
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Northants, UK
    Posts
    1
    Rep Power
    0

    Some success


    I was hitting the same brick wall as Swedish Dude and then I put together all the different things I've read in various places and suddenly:

    python2.3.2+pygame1.6 + numarray + py2exe0.5.0 = Executable program

    Here, in reverse order are the things that I did:

    (1)
    I ignored the warning messages that PY2EXE gives me, like:
    The following modules appear to be missing
    ['AppKit', 'Convolve', 'Convolve.Lineshape', 'Foundation', 'cephes', 'dotblas', 'objc', 'timing', 'numarray.libteacup', 'numarray.zeros']

    I have no idea what all these things do and as long as my program doesn't need them, I'm happy.

    (2)
    Also, I read somewhere about the line:
    __LICENSE__ = open(_os.path.join(__path__[0],"LICENSE.txt")).read()
    in numarray.__init__.py causing a problem. So I commented it out, destroyed the .pyc. and .pyo versions of __init__ and re-built.

    (3)
    in my command line, I added -pnumarray
    i.e.: python setup.py py2exe -pnumarray


    (4)
    Also, from yesterday's researches, I added a setup.cfg file which is used by py2exe as well as the setup.py. The contents of that are:
    [py2exe]
    includes=numarray.libnumarray, numarray.memory, numarray._bytes, numarray._chararray, numarray._conv, numarray._converter, numarray._ndarray, numarray._numarray, numarray._operator, numarray._sort, numarray._ufunc, numarray._ufuncBool, numarray._ufuncComplex32, numarray._ufuncComplex64, numarray._ufuncFloat32, numarray._ufuncFloat64, numarray._ufuncInt16, numarray._ufuncInt32, numarray._ufuncInt64, numarray._ufuncInt8, numarray._ufuncUInt16, numarray._ufuncUInt32, numarray._ufuncUInt8
    includes=pygame.surfarray

    and I don't know whether that was needed or not or whether it is now redundant because of step(3).

    I hope that helps. I haven't a clue what I'm doing, which makes it even more pleasing when something works!
  14. #23
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    1
    Rep Power
    0

    same problem


    I, also am having the same problem with a runtime error ("The application has requested the Runtime to terminate in an unusual way."...) . I am using Python 2.3.4, pygame 1.6 and py2exe 0.5.0 . Did anyone find a way to make it compile?

    Thanks
  16. #24
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    12
    Rep Power
    0
    Originally Posted by BenFriman
    (3) in my command line, I added -pnumarray i.e.: python setup.py py2exe -pnumarray
    I was getting the error message that numarray.zeros was missing even though it was not being used in my script (numarray is used; numarray.zeros is not).

    I then (for the heck of it) tried to create the executable with the -pnumarray option. Sure, I got some more error messages saying some modules could not be loaded, but the executable actually works!!!!!!

    Anyone got any ideas what is going on here?
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo