sudo apt-get install libpng-dev

sudo apt-get install python3-pil

sudo apt-get install python3-dev

pip3 install --upgrade --no-cache-dir dlib==19.24.0




For Jetson

sudo apt-get install python3-pil

Install dlib(from source, gpu) on Jetson NX did not work correctly

My environment: Xavier NX + JetPack 4.6

I solved this issue following the help here: https://forums.developer.nvidia.com/t/simple-accelerated-face-recognition/142679/19

Most importantly, make sure you use dlib19.21, neither dlib19.23 nor dlib 19.17.

Simple accelerated face recognition

Hi,

The fix is adding the cuDNNv8 new API support.And it is available in the newest dlib-19.21 release in Aug 8.

So you can build it from source directly:

Install dependencies

$ sudo apt-get install python3-pip
$ sudo apt-get install libjpeg-dev

Build dlib from source