在安装dlib库时,会遇上很多问题,特别时用pip安装时,因为没有安装cmake和boost等工具就会出错。
yum install gcc gcc-c++
yum install cmake boost
yum install opencv opencv-python opencv-devel python-devel numpy
pip install dlib -i https://pypi.douban.com/simple/
Collecting dlib。。。。
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
解决办法
yum install cmake gcc-c++
另一个问题
另外一个地方可能会报错
fatal error: Python.h: No such file or directory
#include <Python.h>
compilation terminated.
解决办法:
debain系
sudo apt install python3-dev
rehat系
yum install python3-devel