[Solved] pip install face_recognition giving error


CMake must be installed to build the following extensions: dlib

Failed building wheel for dlib
Running clean for dlib
Failed to build dlib

Enquirer: Nishant


Solution #1:

I ran into this issue as well. I am using windows and have a python environment that I am installing the requirements to.

I ran pip install cmake , and then pip install dlib. I no longer received the error and successfully installed dlib.

Respondent: Sayed Mohsin Reza

Solution #2:

I also had the same issue. For those who deals with it now –

Firstly you have to install visual studio,
and than install there the extension “tools for CMake”.
Look at the installation part here:

Only after that you will be able to pip install this package.


  1. Install VS
  2. Install the extension “tools for CMake”
  3. Of course you should also have the python interpreter installed
  4. In the command line:
    • pip install CMake
    • pip install face_recognition

Not checked,
but if you don’t have Visual Studio installed, try install “CMake Tools” separately, maybe from here:

Respondent: Liram Zarrouk

Solution #3:

  1. first install dlib file manually – download file from here
  2. then install cmake
  3. install face-recognition

just go and watch the full video

Solution #4:


Follow these steps from the start.

1 – Downgrade to python 3.6.8.

2 – Install visual studio UPDATE 3

People usually have visual studio 2015 and the process still doesn’t work
and the reason is the update. You have to update it to update 3.


Install visual studio 2015 Update 3 from here

Now, some people have already installed VS 2015 so how to update?

Launch Visual Studio > Tools > Extensions And Updates > New Window Will open, navigate left and click on Updates > Update

3 – Download and install CMake from here. During installation, Check the Add To Path CheckBox.

4 – pip install cmake

5 – pip install face_recognition

Respondent: Mujeeb Ishaque

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy