时效性:2019年
必须拥有的:Visual Studio、Cmake
1、安装Visual Studio(因为cmake依赖C++)
到官网下载并安装社区版,勾选C++套件。
2、安装Cmake(因为dlib库需要cmake编译)
到官网下载并安装
3、安装face_recognition和dlib
利用pip安装,pip install face_recognition
,安装face_recognition会自动安装dlib
如果遇到下载网速太慢的问题,可以到PyPI上用自己的下载工具下载好,然后离线安装。
下载链接,下载后缀为whl的问题,然后在文件保存位置运行 pip install face_recognition-xx.whl
,按Tab可以自动补全。
4、曾经遇到的报错有
CMake Error in CMakeLists.txt:
Generator NMake Makefiles does not support platform specification, but platform x64 was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
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