views:

845

answers:

1

I'm trying to compile my python script into a single .exe using gui2exe (which uses py2exe to create a .exe). My program is using wxWidgets and everytime I try to compile it I get the following error message:

error MSVCP90.dll: No such file or directory.

I have already downloaded and installed the VC++ redistributable package, so I should have this .dll shouldn't I?

+4  A: 

Yes you should have it. You have to exclude it from py2exe.

options = {
    'py2exe': {
        'dll_excludes': [
            'MSVCP90.dll'
         ]
     }
}

setup(windows=["main.py"], options=options)
Georg
Um? What? Can you be a little more specific.
Lucas McCoy
Sure, I hope this example helps,
Georg
Just tried it, still get the same error.
Lucas McCoy
Ok, You spelled options wrong. I fixed it and it worked! Thanks!
Lucas McCoy
Thanks. :) You should be aware, that you have to install MSVCP90.DLL on the target PC yourself now. For more information look at this question: http://stackoverflow.com/questions/323424/py2exe-fails-to-generate-an-executable
Georg
Thank you thank you thank you!!
David Sykes