在Windows 7中安装Caffe时无法解决错误

时间:2019-06-12 15:34:12

标签: caffe lattice ninja

我正在尝试使用以下方法在Windows 7上安装caffe: https://github.com/BVLC/caffe/tree/windows

当我在cmd中运行此命令时:scripts \ build_win.cmd

我收到此错误:

   '"C:\Program Files (x86)\Microsoft Visual Studio 
   14.0\Common7\Tools\..\..\VC\vcvarsall.bat"' is not recognized as an 
    internal or external command,
    operable program or batch file.
    CMake Error at CMakeLists.txt:18 (project):
    Failed to run MSBuild command:

   C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

   to get the value of VCTargetsPath:

  Microsoft (R) Build Engine version 14.0.25420.1
  Copyright (C) Microsoft Corporation. All rights reserved.

   Build started 6/12/2019 9:59:03 AM.
   Project 
  "C:\Projects\caffe\build\CMakeFiles\3.15.0rc1\VCTargetsPath.vcxproj
  " on node 1 (default targets).
   C:\Program 
   Files(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\Platfor
   mToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK 
   version 8.1 was not found. Install the required version of Windows SDK or 
   change the SDK version in the project property pages or by right-clicking 
   the solution and selecting "Retarget solution". 
   [C:\Projects\caffe\build\CMakeFiles\3.15.0-rc1\VCTargetsPath.vcxproj]
   Done Building Project 
    "C:\Projects\caffe\build\CMakeFiles\3.15.rc1\VCTargetsPath.vcxproj" 
    (default targets) -- FAILED.

    Build FAILED.

    "C:\Projects\caffe\build\CMakeFiles\3.15.0-rc1\VCTargetsPath.vcxproj" 
    (default target) (1) ->
    Desktop_PlatformPrepareForBuild target) ->C:\Program Files 
   (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\Platf
   ormToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK 
    version 8.1 was not found. Install the required version of Windows SDK 
    or change the SDK version in the project property pages or by right- 
   clicking the solution and selecting "Retarget solution". 
     [C:\Projects\caffe\build\CMakeFiles\3.15.0-rc1\VCTarg
     etsPath.vcxproj]

        0 Warning(s)
        1 Error(s)

       Time Elapsed 00:00:00.57


     Exit code: 1



    -- Configuring incomplete, errors occurred!
    See also "C:/Projects/caffe/build/CMakeFiles/CMakeOutput.log".
    ERROR: Configure failed

我运行了以下命令:

     C:\Projects> git clone https://github.com/BVLC/caffe.git
     C:\Projects> cd caffe
     C:\Projects\caffe> git checkout windows
     :: Edit any of the options inside build_win.cmd to suit your needs
     C:\Projects\caffe> scripts\build_win.cmd

我已经安装了CUDA Toolkit v8.1和cudnn 5.1

我还更改了build_win.cmd中的设置:     WITH_NINJA = 0

对此我是陌生的,将不胜感激。

谢谢!

0 个答案:

没有答案