【问题标题】:i can't install caffe on anaconda CPU-only windows 10我无法在只有 anaconda CPU 的 Windows 10 上安装 caffe
【发布时间】:2017-05-10 01:14:00
【问题描述】:

我在安装 caffe 时遇到此错误!:

.................................................. .....................

    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                 = 1
INFO: CMAKE_GENERATOR            = "Ninja"
INFO: CPU_ONLY                   = 1
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.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:18 (project):
  No CMAKE_C_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:18 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "C:/Projects/caffe/build/CMakeFiles/CMakeError.log".

ERROR: Configure failed

.................................................. ....................

系统信息:我使用的是 Windows 10 64 位操作系统

已安装: 蟒蛇 蟒蛇 2.7 和蟒蛇 3.6 我没有 GPU,所以只有 CPU

如果有人能帮我解决这个问题,我将不胜感激>

【问题讨论】:

  • 你有没有试过用谷歌搜索错误信息No CMAKE_C_COMPILER could be found?有很多关于此类错误的帖子。
  • 您使用什么命令进行安装...我猜您正在构建...这取决于?
  • 是的,我尝试使用此链接安装 caffe:github.com/BVLC/caffe/tree/windows

标签: python cmake deep-learning anaconda caffe


【解决方案1】:

你需要设置CMAKE_C_COMPILERCMAKE_CXX_COMPILER。这可以通过编辑 scripts/build_win.cmd 在运行 cmake 时为您的 C 和 C++ 编译器提供正确的路径来完成(大约在第 160 行左右)

例如。

cmake -G"!CMAKE_GENERATOR!" ^
...
-DCMAKE_C_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64/cl.exe" ^
-DCMAKE_CXX_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64/cl.exe" ^
...

【讨论】:

    猜你喜欢
    • 2020-01-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-07
    • 2019-02-07
    相关资源
    最近更新 更多