Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: "MSVCP90.dll: No such file or directory" even though Microsoft Visual C++ 2008 Redistributable Package is installed

I'm trying to build a package from source by executing python setup.py py2exe

This is the section of code from setup.py, I suppose would be relevant:

if sys.platform == "win32": # For py2exe.
    import matplotlib
    sys.path.append("C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\redist\\x86\\Microsoft.VC90.CRT")
    base_path = ""
    data_files = [("Microsoft.VC90.CRT", glob.glob(r"C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*")),

Error it shows:

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

But I've installed "Microsoft Visual C++ 2008 Redistributable Package". I'm running 32-bit python on 64-bit Windows 8. I'm trying to build a 32-bit binaries.

Also there is no folder like this: "C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\". This is what my computer contains:

enter image description here

EDIT:

On searching for msvcp90.dll on my C:\ drive I found that they are installed in weird paths like this:

enter image description here

like image 509
claws Avatar asked Aug 26 '12 05:08

claws


People also ask

Where is msvcp90 dll located?

You can download msvcp90. dll from here: http://www.dll-files.com/pop.php?dll=msvcp90 . Just follow the instructions on the page to unzip and save the file to C:\Windows\System32.

What is msvcp90 dll?

Msvcp90. dll errors are caused by situations that lead to the removal or corruption of the msvcp90 DLL file, a critical file that's part of the MS Visual C++ runtime library. In some cases, msvcp90. dll errors could indicate a registry problem, a virus or malware issue, or even a hardware failure. The msvcp90.


1 Answers

I would recommend ignoring the dependency outright. Add MSVCP90.dll to the list of dll_excludes given as an option to py2exe. Users will have to install the Microsoft Visual C++ 2008 redistributable. An example:

setup(
    options = {
            "py2exe":{
            ...
            "dll_excludes": ["MSVCP90.dll", "HID.DLL", "w9xpopen.exe"],
            ...
        }
    },
    console = [{'script': 'program.py'}]
)
like image 81
nneonneo Avatar answered Sep 18 '22 14:09

nneonneo