错误:“MSVCP90.dll:没有这样的文件或目录"即使安装了 Microsoft Visual C++ 2008 Redistributable Package [英] Error: "MSVCP90.dll: No such file or directory" even though Microsoft Visual C++ 2008 Redistributable Package is installed

查看:32
本文介绍了错误:“MSVCP90.dll:没有这样的文件或目录"即使安装了 Microsoft Visual C++ 2008 Redistributable Package的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过执行 python setup.py py2exe

这是 setup.py 中的代码部分,我想应该是相关的:

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\*.*")),

显示的错误:

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

但我已经安装了Microsoft Visual C++ 2008 Redistributable Package".我正在 64 位 Windows 8 上运行 32 位 python.我正在尝试构建一个 32 位二进制文​​件.

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.

也没有这样的文件夹:C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\".这是我的电脑包含的内容:

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

在我的 C:\ 驱动器上搜索 msvcp90.dll 时,我发现它们安装在如下奇怪的路径中:

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

推荐答案

我建议完全忽略依赖项.将 MSVCP90.dll 添加到作为 py2exe 选项给出的 dll_excludes 列表中.用户必须安装 Microsoft Visual C++ 2008 可再发行组件.一个例子:

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'}]
)

这篇关于错误:“MSVCP90.dll:没有这样的文件或目录"即使安装了 Microsoft Visual C++ 2008 Redistributable Package的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆