Hi, I'm very new to Python and programing in general and wanted to learn how to use the py2exe module. I think I've done the setup alright but I get an error message. Everything runs along smoothly until it start to make the dist folder. When it begins to make it i get and error message in Windows that says that py2exe_util.pyd is not a valid Windows image. Then I get an error message in the command prompt saying that DLL load failed with error code 193. I think the problem has something to do with py2exe_util but I don't know how to fix it. Does anyone know why this happens and how to fix it? By the way I'm using Windows XP.

I'm including my setup code just in case:

from distutils.core import setup
import py2exe

setup(console=['area.py'])

I know the code is very simple but this was just something to test if the module worked

Thanks in advance

I've tried your advice the program is certainly easier to use, but I still get an error message. I run the program and it creates the setup file, but when the file runs I get an error it says the file can't be found. Then if I run the setup file created in IDLE, when it runs it just asks me if I want to exit altoghether. Also, I've tried adding the patch that is recommended to be added to build_exe.py and I get an error when I run it. I fixed the indentation but the is an invalid sintax error in the patch. I sent the built_exe module with the patch included to see if maybe I made a mistake inserting it but I dont think I did. I think the main problem is with the py2exe module, do I have to write the programs I want to convert in the py2exe folder or something?
EDIT:
This is the error message in case it helps: Execution of command 'python-u "PATH TO PROGRAM CREATED BY THE GUI" py2exe' failed (error 2: the system cannot find the file specified)
EDIT2:
If I save the python document the GUI creates but cannot run and run it seperatly, I get the following error:

Traceback (most recent call last):
  File "PATH", line 120, in <module>
    windows = [test_wx]
  File "C:\Python25\lib\distutils\core.py", line 139, in setup
    raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
SystemExit: usage: tmpnwys32.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: tmpnwys32.py --help [cmd1 cmd2 ...]
   or: tmpnwys32.py --help-commands
   or: tmpnwys32.py cmd --help

error: no commands supplied

Thanks

This might be really old, but maybe you are still looking for an answer. I had the same problem, but I then found out that I had the wrong version of py2exe. I downloaded the 64-bit window version instead of the 32-bit version. Check to make sure that you have the right version or py2exe will not work.