There is a very easy possibility to use dlib on macOS. Additional packages and package manager (for example brew) are not needed. Here are the instructions which you can follow independently in a few minutes.
Requirements
- Python 3.x installed
Steps
Download latest cmake version as *.dmg or *.tar.gz from cmake.org. After the app has been successfully installed, you can start it (but it is not necessary).
Inside the CMake application you will find the needed binary. All you have to do now is create a symlink and optionally check the version.
# create symlink
$ sudo ln -s /Applications/CMake.app/Contents/bin/cmake /usr/local/bin/cmake
# check version (optional)
$ cmake --version
Note: Close the terminal and restart if cmake is not found.
If you now want to install dlib in your Python project (in the virtual environment), there will no longer be an error message. Note that the installation may take some time.
# install dlib
(venv) $ pip3 install dlib
# verify dlib installation (optional)
(venv) $ pip3 freeze
That’s it. Made super easy and super fast without bloating the entire system with unnecessary ballast.