views:

839

answers:

4

I have a problem: I used py2exe for my program, and it worked on my computer. I packaged it with Inno Setup (still worked on my computer), but when I sent it to a different computer, I got the following error when trying to run the application: "CreateProcess failed; code 14001." The app won't run. (Note: I am using wxPython and the multiprocessing module in my program.) I googled for it a bit and found that the the user should install some MS redistributable something, but I don't want to make life complicated for my users. Is there a solution?

Versions:

Python 2.6.2c1, py2exe 0.6.9, Windows XP Pro

A: 

You can ship the runtime DLLs in question with your application as a "private assembly". This simply means putting a copy of a specially-named directory containing the runtime DLLs and their manifests alongside your executable.

See my answer to this post.

RichieHindle
+1  A: 

You should be able to install that MS redistributable thingy as a part of your InnoSetup setup exe.

Lennart Regebro
A: 

You need to include msvcr90.dll, Microsoft.VC90.CRT.manifest, and python.exe.manifest (renamed to [yourappname].exe.manifest) in your install directory. These files will be in the Python26 directory on your system if you installed Python with the "Just for me" option.

Instructions for doing this can be found here.

Don't forget to call multiprocessing.freeze_support() in your main function also, or you will have problems when you start a new process.

While others have discussed including the MSVC runtime in your install package, the above solution works when you only want to distribute a single .zip file containing all your files. It avoids having to create a separate install package when you don't want that additional complication.

Brandon Corfman
A: 

When you run py2exe, look closely at the final messages when it's completed. It gives you a list of DLLs that it says are needed by the program, but that py2exe doesn't automatically bundle.

Many in the list are reliably available on any Windows install, but there will be a few that you should manually bundle into your Inno Setup installation. Some are only needed if you want to deploy on older Windows installs e.g. Win 2000 or earlier.

Craig McQueen