未能 运行 MSBuild.exe
Failed to run MSBuild.exe
我正在尝试在 windows 10 中为 Python 3.5 安装 CAFFE。我按照 https://github.com/BVLC/caffe/tree/windows 中的说明进行操作,并设置 With_Ninja=0;在命令提示符下执行 "scripts\build_win.cmd" 时出现以下错误。 (我是 运行 visual studio 15 2017)
c:\projects\caffe>scripts\build_win.cmd
The system cannot find the drive specified.
The system cannot find the drive specified.
INFO: ============================================================
INFO: Summary:
INFO: ============================================================
INFO: MSVC_VERSION = 14
INFO: WITH_NINJA = 0
INFO: CMAKE_GENERATOR = "Visual Studio 14 2015 Win64"
INFO: CPU_ONLY = 0
INFO: CUDA_ARCH_NAME = Auto
INFO: CMAKE_CONFIG = Release
INFO: USE_NCCL = 0
INFO: CMAKE_BUILD_SHARED_LIBS = 0
INFO: PYTHON_VERSION = 2
INFO: BUILD_PYTHON = 1
INFO: BUILD_PYTHON_LAYER = 1
INFO: BUILD_MATLAB = 0
INFO: PYTHON_EXE = "python"
INFO: RUN_TESTS = 0
INFO: RUN_LINT = 0
INFO: RUN_INSTALL = 0
INFO: ============================================================
The system cannot find the path specified.
CMake Error at CMakeLists.txt:18 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
See also "C:/projects/caffe/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure failed
您的 VS 版本与要求的版本不匹配。参见:
I am running visual studio 15 2017
并且,
INFO: CMAKE_GENERATOR = "Visual Studio 14 2015 Win64"
现在,您应该将版本更改为 VS 15,但我记得 VS 15 不支持 "caffe" and/or 会有错误。因此,您应该获得 VS 14 (Visual Studio 2015)。
事实上,你甚至不需要安装整个东西,安装 2015 版本的 MSBuild.exe (a.k.a Build Tools),如果没有自动完成,请将 .exe 的路径添加到系统变量中。路径可能应该是 C:\Program Files (x86)\MSBuild.0\Bin
,这应该足以解决问题。
P.S。此外,更改
INFO: PYTHON_VERSION = 2
到,
INFO: PYTHON_VERSION = 3
因为您正在使用 Python 3.5
P.P.S。如果您没有按照 GPU 支持说明进行操作,则需要返回并进行更改
INFO: CPU_ONLY = 0
到,
INFO: CPU_ONLY = 1
祝你好运。
我正在尝试在 windows 10 中为 Python 3.5 安装 CAFFE。我按照 https://github.com/BVLC/caffe/tree/windows 中的说明进行操作,并设置 With_Ninja=0;在命令提示符下执行 "scripts\build_win.cmd" 时出现以下错误。 (我是 运行 visual studio 15 2017)
c:\projects\caffe>scripts\build_win.cmd
The system cannot find the drive specified.
The system cannot find the drive specified.
INFO: ============================================================
INFO: Summary:
INFO: ============================================================
INFO: MSVC_VERSION = 14
INFO: WITH_NINJA = 0
INFO: CMAKE_GENERATOR = "Visual Studio 14 2015 Win64"
INFO: CPU_ONLY = 0
INFO: CUDA_ARCH_NAME = Auto
INFO: CMAKE_CONFIG = Release
INFO: USE_NCCL = 0
INFO: CMAKE_BUILD_SHARED_LIBS = 0
INFO: PYTHON_VERSION = 2
INFO: BUILD_PYTHON = 1
INFO: BUILD_PYTHON_LAYER = 1
INFO: BUILD_MATLAB = 0
INFO: PYTHON_EXE = "python"
INFO: RUN_TESTS = 0
INFO: RUN_LINT = 0
INFO: RUN_INSTALL = 0
INFO: ============================================================
The system cannot find the path specified.
CMake Error at CMakeLists.txt:18 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
See also "C:/projects/caffe/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure failed
您的 VS 版本与要求的版本不匹配。参见:
I am running visual studio 15 2017
并且,
INFO: CMAKE_GENERATOR = "Visual Studio 14 2015 Win64"
现在,您应该将版本更改为 VS 15,但我记得 VS 15 不支持 "caffe" and/or 会有错误。因此,您应该获得 VS 14 (Visual Studio 2015)。
事实上,你甚至不需要安装整个东西,安装 2015 版本的 MSBuild.exe (a.k.a Build Tools),如果没有自动完成,请将 .exe 的路径添加到系统变量中。路径可能应该是 C:\Program Files (x86)\MSBuild.0\Bin
,这应该足以解决问题。
P.S。此外,更改
INFO: PYTHON_VERSION = 2
到,
INFO: PYTHON_VERSION = 3
因为您正在使用 Python 3.5
P.P.S。如果您没有按照 GPU 支持说明进行操作,则需要返回并进行更改
INFO: CPU_ONLY = 0
到,
INFO: CPU_ONLY = 1
祝你好运。