在我们的项目中dlib用在人脸检测中,所以需要安装,但是在第一次实验的过程中发现,pip3 install dilb==19.8.1并不能成功的安装dlib的安装包,所以就上网搜了有关教程。
- 首先需要Cmake以及编译C++成python程序的工具
sudo apt-get install libboost-python-dev cmake
-
download dlib19.7 from http://dlib.net/
-
unzip the package
tar xvf [filename]
- install it
sudo python3 setup.py install
或者
sudo python3 setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA
- wait to finished and test
nvidia@tegra-ubuntu:~$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlib
>>>
PS: pip install dlib==19.4.0