Problems with installing dlib for Pyimagesearch on Raspberry Pi

Kollin_58 report abuse

I faced a problem while installing dlib library on Raspberry Pi. I tried to do app with face recognition. I installed OpenCV 4 following instructions on Pyimagesearch site, and then tried to set up features for facial recognition. But installing dlib leads to total failure and inability to build the wheel. Any ideas how to deal with this problem?


Tinkerberg report abuse

Hi @Kollin_58

Were you already able to solve this?

Here are the steps that helped me to install dlib with zero conflicts

  1. Download the latest Raspbian Jessie Light image.
  2. Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.
  3. Log in
  4. In case you are using WiFi, set up Wifi
  5. Run sudo raspi-config and configure the basics
  6. Install required libraries.
  7. In case you are using camera install the picamera python library with array support.
  8. Temporarily enable a larger swap file size (dlib can fail while compilation if there's not enough memory, so better avoid such situation).
  9. Download and install dlib.
  10. Install face_recognition
  11. Restore the swap file size now that dlib is installed.
  12. Download the face recognition code examples.

You can install PIXEL if you want desktop GUI.

Good luck! Hope it will help you.

Add Answer

Need support?

Just drop us an email to ... Show more