#109 py2exe not working on py2.6 due to missing MSVCP90.dll


First, I'm not sure whether the mentioned issue is a problem with py2exe, but I simply came acros it while trying py2exe 0.6.9 with pyton 2.6.

After installing py2exe for python 2.6 and simply trying the script (a wx app) and its setup script (working ok using py2exe on py 2.5) I got the error while converting to exe.

*** finding dlls needed ***
error: MSVCP90.dll: No such file or directory

Strangely (for me) in python26 directory (installed using the standard windows installer form python.org) there is only msvcr71.dll from this category (possibly added by wxpython install?).

After I copied the mentioned missing file from
C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_ ... \msvcp90.dll

to the python26 directory (where the setup script is also run from), the compilation runs ok, and the resulting exe in the dist folder works ok on that computer. (for some machines I also had to copy some redistributables to the app folder in order to get it work)

The computers I tried are running WinXPh or XPp with SP3;
the python version is 2.6, other involved libraries besides py2exe 0.6.9 is maybe wxPython unicode for py26.

I found some references regarding problems with redistributables e.g.


but it's not quite clear to me, what the deployment using an exe should look like in order to be reasonably sure, that the app will work regardles of the particular computer setup.

I also don't think it should be a standard approach to just copy the missing files from anywhere on the drive, where they happen to be found.

Is there some problem in py2exe or somewhere else in python in this regard, or am I doing something wrong, which first started to matter in python 2.6?

If I missed some relevant informations, please let me know.

Vlastimil Brom


  • Anonymous - 2008-12-08

    I've been having a similar issue with Python2.6 and py2exe. My compiled executables work fine on the machine that they were compiled on. But after transferring the .exe to another machine without Python2.6, I get an error saying that the application's configuration is incorrect. I used Dependency Walker to find some .dlls that were missing, downloaded them into the working directory but to no success. I still get the same error. I then decided to try and compile the files with Python2.5 and py2exe. The resulting executables work great on both machines with and without Python. So there is a problem somewhere in Python2.6 or py2exe's version for Python2.6.

  • Nobody/Anonymous

    the bug is still available. ping!

  • David Eaton

    David Eaton - 2009-03-11

    I am having the exact Issue. I am using windows Vista SP1 and I regularly update my windows platform.

    I can compile my program using py2exe using this configuration.

    And everything works fine, I can run and compile my program into a nice exe.

    but when I tried to upgrade using this configuration

    I get alot of problems.

    1. My ToolBar does is not using the themes anymore while my menu bar is. I even applied the update_manifest.py fix. I will show you my setup.py at the bottom of this comment. I have even applied the manifest fix in the setup.py. It fixes it in the 2.5.x version but I am having different issues on 2.6.x but nearly the same problem.

    2. When I compile using py2exe I get the following.

    Microsoft Windows [Version 6.0.6001]
    Copyright (c) 2006 Microsoft Corporation. All rights reserved.

    C:\Users\dae>cd C:\Users\dae\Desktop\RK_Python\RK3


    C:\Users\dae\Desktop\RK_Python\RK3>python setup26.py py2exe


    c:\python26\lib\site-packages\py2exe\build_exe.py:16: Deprecation Warning: the sets module is deprecated
    import sets
    running py2exe
    *** searching for required modules ***
    *** parsing results ***
    **[SNIP SNIP for Readability]***

    *** finding dlls needed ***
    error: MSVCP90.dll: No such file or director

    I tried researching it on the google and I found this package http://support.microsoft.com/kb/956414 has the MSVCP90.dll and you can download it here ( http://www.microsoft.com/downloads/thankyou.aspx?familyId=a5c84275-3b97-4ab7-a40d-3802b2af5fc2&displayLang=en ) Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)

    I even tried and Installed these:

    Microsoft Visual C++ 2005 Redistributable Package (x86)

    Microsoft Visual C++ 2008 Redistributable Package (x86)

    Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)

    That was suppose to help, but it still does not work. it will not even let me compile, it gets to the error and closes the black screen. I have tried restarting the computer after I ran each Microsoft installer

    I tried to download just that one dll (msvcp90.dll) http://www.dll-files.com/dllindex/dll-files.shtml?msvcp90 from a third party site. and place it in the "C:\Windows\System32\" folder and register that .dll

    Open up your CMD window (the black screen) and type this "regsvr32 C:\Windows\System32\msvcp90.dll"

    but it would not register correctly on Vista.. Maybe there's more needed to get this .dll to work correctly.

    I can't seem to figure this out.. Here are some more threads on the same topic


    So I guess I am just stuck reverting back to Python 2.5.4 since it's the most stable with Py2exe. I would love to find a fix that actually works.

    Here is my setup26.py

    # Start File
    from distutils.core import setup
    import py2exe,sys,os

    manifest = """
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1"

    installs manifest and icon into the .exe
    but icon is still needed as we open it
    for the window icon (not just the .exe)
    changelog and logo are included in dist

    # I can use this to fool py2exe! Docs - http://www.py2exe.org/index.cgi/OverridingCriteraForIncludingDlls
    origIsSystemDLL = py2exe.build_exe.isSystemDLL
    def isSystemDLL(pathname):
    if os.path.basename(pathname).lower() in ("msvcp90.dll", "gdiplus.dll"):
    return 0
    return origIsSystemDLL(pathname)
    py2exe.build_exe.isSystemDLL = isSystemDLL

    name="Referral Keeper",
    version ="3.0.0",
    description ="Referral Keeper - Referral Traffic Machine",
    author="David A Eaton",
    windows = [
    "RK3.py", ### Main Python script
    [(0, "myicon.ico")], ### Icon to embed into the PE file. It's in the same folder as this script.
    [(24,1,manifest)], #Stops weird Compile Errors with toolbar images, ect. works great on python 2.5.4 not sure on 2.6.1

    "unbuffered": True,
    "optimize": 2

    input("<Click Enter to Exit>")

    # End File

  • Nobody/Anonymous

    I confirm this bug with py2exe-python2.6

  • Nobody/Anonymous

    I also confirm this bug. I have been waiting a long time for a solution.

  • Nobody/Anonymous

    Same here, I encountered the same problem. But the hack-ish solution I've been working with us to put the dependent files into my application folder using the py2exe script by using the "data_files" option:-

    data_files = [

    This assuming of course that you have a folder called DLLs in your current working path with all those 4 files. It seems to work for now...

  • Nobody/Anonymous


  • Nobody/Anonymous



Log in to post a comment.