我是靠谱客的博主 超级信封,最近开发中收集的这篇文章主要介绍error: Unable to find vcvarsall.bat与D:\\vs2015\\VC\\BIN\\x86_amd64\\cl.exe failed,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

我在执行make命令时出错error: Unable to find vcvarsall.bat

安装了vs2015之后就没有这个问题了,换了个bug…

 make
python setup.py build_ext --inplace
running build_ext
building 'nms' extension
creating build
creating buildtemp.win-amd64-3.6
creating buildtemp.win-amd64-3.6Release
D:vs2015VCBINx86_amd64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:anacondalibsite-packagesnumpycoreinclude -ID:anacondainclude -ID:anacondainclude -ID:vs2015VCINCLUDE -ID:vs2015VCATLMFCINCLUDE "-IC:Program Files (x86)Windows Kits10include10.0.10150.0ucrt" "-IC:Program Files (x86)Windows KitsNETFXSDK4.6includeum" "-IC:Program Files (x86)Windows Kits8.1includeshared" "-IC:Program Files (x86)Windows Kits8.1includeum" "-IC:Program Files (x86)Windows Kits8.1includewinrt" /Tcnms.c /Fobuildtemp.win-amd64-3.6Releasenms.obj -Wno-cpp -Wno-unused-function
cl: 命令行 error D8021 :无效的数值参数“/Wno-cpp”
error: command 'D:\vs2015\VC\BIN\x86_amd64\cl.exe' failed with exit status 2
make: *** [Makefile:2: all] Error 1

解决方法,把出错的两个参数/Wno-cpp和-Wno-unused-function在setup.py里注释掉

import numpy
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize

extensions = [
    Extension(
        "nms",
        ["nms.pyx"],
        #extra_compile_args=["-Wno-cpp", "-Wno-unused-function"]
    )
]

setup(
    name="coco",
    ext_modules=cythonize(extensions),
    include_dirs=[numpy.get_include()]
)

程序可以运行,好骚气的操作。。

参考博客

最后

以上就是超级信封为你收集整理的error: Unable to find vcvarsall.bat与D:\\vs2015\\VC\\BIN\\x86_amd64\\cl.exe failed的全部内容,希望文章能够帮你解决error: Unable to find vcvarsall.bat与D:\\vs2015\\VC\\BIN\\x86_amd64\\cl.exe failed所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(73)

评论列表共有 0 条评论

立即
投稿
返回
顶部