简体   繁体   English

Python:安装face_recognition时CMake错误

[英]Python: CMake error when installing face_recognition

I'm trying to install face_recognition and have already installed dlib, CMake, numpy, scipy and Boost. 我正在尝试安装face_recognition,并且已经安装了dlib,CMake,numpy,scipy和Boost。 However when I run 但是当我跑步时

pip install face_recognition

I get this error: 我收到此错误:

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".

I don't have much of an idea what this means. 我不太了解这意味着什么。 Any help would be appreciated 任何帮助,将不胜感激

You need to download the .whl package of dlib of your version of python note the minimum is 19.7 您需要下载 python版本的dlib的.whl包, 注意最低为19.7

Download the latest version of cmake for your version of windows. 为您的Windows 版本下载最新版本的cmake
When installing cmake make sure that you tick the option to add it to the system path. 在安装cmake时,请确保您勾选了将其添加到系统路径的选项。

Finally pip install face_recognition 最后pip install face_recognition

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM