我正在尝试在Windows 10中为Python 3.5安装CAFFE。我按照https://github.com/BVLC/caffe/tree/windows中的说明操作,并设置With_Ninja = 0;执行" scripts \ build_win.cmd"时出现以下错误在命令提示符下。 (我正在运行视觉工作室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
答案 0 :(得分:1)
您的VS版本与所需版本不匹配。参见:
我正在运行视觉工作室15 2017
和
信息:CMAKE_GENERATOR =“Visual Studio 14 2015 Win64”
现在,您应该将您的版本更改为VS 15,但我记得VS 15不会支持“caffe”和/或将会出错。因此,你应该得到VS 14(Visual Studio 2015)。
事实上,你甚至不需要安装整个东西,安装2015版的MSBuild.exe(a.k.a构建工具),如果没有自动完成系统变量,则添加.exe的路径。路径应该是C:\Program Files (x86)\MSBuild\14.0\Bin
,这应该足以解决问题。
P.S。另外,改变
INFO:PYTHON_VERSION = 2
要,
INFO:PYTHON_VERSION = 3
因为您使用的是Python 3.5
P.P.S。如果您没有按照GPU支持的说明进行操作,那么您将需要返回并执行或更改
INFO:CPU_ONLY = 0
to,
祝你好运。INFO:CPU_ONLY = 1