Thread: py2exe problems

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Posts
    34
    Rep Power
    0

    py2exe problems


    i have compiled py2exe programs before, but it ain't working this time.

    The modules i am using include wxpython, the COM stuff, i am using an .ico file.

    It's stops when it says it's loading the dlls (are something similar)


    any idea?
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    Post more specific info like the trace and we might be able to help

    Is this a new install of Python,wxpython or py2exe or is it the same machine/setup as before when it was working?

    grim
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Posts
    34
    Rep Power
    0
    i cannot print the trace cus the dos window exits to quickly! i know this sounds stupid (because it is), but can i run this using something like idle (requires a command argument so i cannot just press f5, and there seems to be know way of adding command arguments in idle).

    it seems to be an issue with adding an icon in wxpython, which is weird cus i swear i have done this before...
  6. #4
  7. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    Then run it from a command shell and redirect the output to a file or do something like this:

    http://www.pharscape.org/index.php?option=com_content&task=view&id=18&Itemid=51

    This sample shows you how to add command line arguments

    it is equivalent to :

    python setup.py py2exe


    you should be able to append more command line arguments
    sys.argv.append("my extras")

    Not tried this but it should work.

    grim
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Posts
    34
    Rep Power
    0
    this is what i get:
    running py2exe
    creating C:\Documents and Settings\All Users\Desktop\title\build
    creating C:\Documents and Settings\All Users\Desktop\title\build\bdist.win32
    creating C:\Documents and Settings\All Users\Desktop\title\build\bdist.win32\winexe
    creating C:\Documents and Settings\All Users\Desktop\title\build\bdist.win32\winexe\collect
    creating C:\Documents and Settings\All Users\Desktop\title\build\bdist.win32\winexe\temp
    creating C:\Documents and Settings\All Users\Desktop\title\dist
    *** searching for required modules ***
    *** parsing results ***
    creating python loader for extension 'wx._misc_'
    creating python loader for extension 'win32api'
    creating python loader for extension 'win32ui'
    creating python loader for extension 'wx._windows_'
    creating python loader for extension 'zlib'
    creating python loader for extension 'wx._gdi_'
    creating python loader for extension 'wx._controls_'
    creating python loader for extension 'wx._core_'
    *** finding dlls needed ***
    Traceback (most recent call last):
    File "C:\Documents and Settings\All Users\Desktop\title\setup.py", line 5, in ?
    setup(console = ["App1.py"])
    File "C:\Python24\lib\distutils\core.py", line 159, in setup
    raise SystemExit, error
    SystemExit: error: MFC71.DLL: No such file or directory
  10. #6
  11. ID10T
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2004
    Location
    Yes
    Posts
    632
    Rep Power
    27
    Did you check to see if you have that file?
  12. #7
  13. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    Sounds like a system file has been deleted or system paths have been altered. MFC is Microsoft Foundation Class and the dll provides access to it.

    mfc71.dll can usually be found in C:\windows\system32 (on XP)
    but some applications also distribute their own copies.

    fyi: the version I have is 7.10.3077.0 and is reported as 1,036 KB big.

    I don't know if the dll is actually needed by your program. If your program runs ok before py2exe converting it then perhaps it might be ok just to exclude it from the dll search.

    grim
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Posts
    34
    Rep Power
    0
    Downloaded MFC71.DLL and it works now. I had MFC70.DLL in system32 folder..

IMN logo majestic logo threadwatch logo seochat tools logo