mac下安装face_recognition

安装依赖库:

一、安装cmake (是一个跨平台的安装工具)python

 brew install cmake

二、安装boost、boost-python(C++的程序库git

brew install boost
brew install boost-python --with-python2.7

三、编译dlibgithub

git clone https://github.com/davisking/dlib.git  
cd dlib
mkdir build
cd build
cmake ..                          //以默认方式(SSE41指令)编译dlib
cmake --build .
cd ..
sudo python setup.py install

4. 安装人脸识别的python库工具

pip install face_recognition

五、安装opencv-pythonui

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python

此时报错:spa

Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurate

解决方案:强行升级code

pip install numpy --ignore-installed numpy