How to install Dlib for Python 3 on Windows

In this video we will see how to install the Dlib library for Python 3 on Windows.

In this specific tutorial we are going to install Dlib 19.8 for Python 3.6 (64 bit version). We choosed this specific version as it’s the latest one (March 2019 the moment I’m writing this post) which has ready binaries for windows.
In other words is the one that is really easy to install.

In this website you find all the binaries available at the moment:
https://pypi.org/simple/dlib/

If you don’t have Python and Opencv installed yet, go first with Python and Opencv installation following this tutorial.

Install Dlib for Python 3.6:

  1. Python 3.6 (64 bit) has to be already installed.
  2. Run Windows Prompt Command. You can type on the search bar “CMD”.

    Remember to click with right button of the mouse and then “Run it as administrator”, otherwise you might not have the permission to install the library.
  3. Type on the prompt command:
    python -m pip install https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0694c5d703c8e037e6aba2e865f9bae22ed63c/dlib-19.8.1-cp36-cp36m-win_amd64.whl#sha256=794994fa2c54e7776659fddb148363a5556468a6d5d46be8dad311722d54bfcf
  4. Once you see the message “Successfully installed dlib“, it means that the installation has been completed.

You can now run Python, try importing the dlib library. If you don’t get any error, it means that the installation was done correctly.