Reputation: 159
I am trying to pip install dlib for a project I am working on, but when I try I get this error:
RuntimeError: CMake must be installed to build the following extensions: dlib
I tried to install CMake, but couldn't understand where should I locate the extracted files?
Upvotes: 15
Views: 37688
Reputation: 105
Download " Binary distributions " with your system OS version from this link. Add install cmake to your system environment variable. Everything will be okay. It worked for me.
Upvotes: 1
Reputation: 514
Here is the main thread solution of this error https://stackoverflow.com/a/52564257/7060530
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.
Upvotes: 30
Reputation: 425
Before installing dlib you need to install prerequisites (cmake, libgtk-3-dev, libboost-all-dev)
If you are using Ubuntu you can install them from terminal
sudo apt-get install build-essential cmake
sudo apt-get install libgtk-3-dev
sudo apt-get install libboost-all-dev
For MACOS you can follow this tutorial
https://www.pyimagesearch.com/2017/03/27/how-to-install-dlib/
Upvotes: 4
Reputation: 81
if you are using conda follow below command
conda install -c conda-forge dlib
Upvotes: 6