【问题标题】:Python: CMake error when installing face_recognitionPython:安装 face_recognition 时出现 CMake 错误
【发布时间】:2018-02-10 19:42:42
【问题描述】:

我正在尝试安装 face_recognition,并且已经安装了 dlib、CMake、numpy、scipy 和 Boost。但是,当我运行

pip install face_recognition

我收到此错误:

Invoking CMake setup: 'cmake c:\Users\Julian\Desktop\deepfakes-master\dlib-master\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\Users\Julian\Desktop\deepfakes-master\dlib-master\build\lib.win32-3.6 -DPYTHON_EXECUTABLE=C:\Users\Julian\AppData\Local\Programs\Python\Python36-32\python.exe -DUSE_AVX_INSTRUCTIONS=yes -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\Users\Julian\Desktop\deepfakes-master\dlib-master\build\lib.win32-3.6'
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
  The CMAKE_C_COMPILER:

cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  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 in CMakeLists.txt:
  The CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  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:/Users/Julian/Desktop/deepfakes-master/dlib-master/build/temp.win32-3.6/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Julian/Desktop/deepfakes-master/dlib-master/build/temp.win32-3.6/Release/CMakeFiles/CMakeError.log".

我不太清楚这意味着什么。任何帮助将不胜感激

【问题讨论】:

  • 你安装了 C++ 编译器吗?

标签: python numpy scope cmake scipy


【解决方案1】:

你需要download the .whl package of dlib你的python版本注意最低是19.7

Download the latest version of cmake 适用于您的 Windows 版本。
安装 cmake 时,请确保您勾选将其添加到系统路径的选项。

最后pip install face_recognition

【讨论】:

    猜你喜欢
    • 2020-05-27
    • 2021-01-23
    • 2021-03-16
    • 1970-01-01
    • 1970-01-01
    • 2021-01-05
    • 1970-01-01
    • 2019-03-01
    • 2021-01-26
    相关资源
    最近更新 更多