How to install Dlib Python API on Windows PC

This tutorial gives complete steps to install Dlib Python API on computer running on Windows operating system.

Step 1: Install Anaconda

Download Anaconda with Python 3. Choose the version x86 or x64 according to the CPU architecture of your PC.

Installation procedure is pretty straight-forward, just follow the setup by selecting Express settings.

Step 2: Create Conda Environment

Open Anaconda command prompt from Windows start menu. First of all update anaconda packages by issuing the following commands.

conda update conda
conda update anaconda

Now, we will create a new conda environment.

conda create -n env_dlib python=3.6

Step 3: Activate new environment

We need to activate the newly created conda environment by using the following command:

conda activate env_dlib

After issuing the above command, we will be migrated from conda ‘base’ to ‘env_dlib’.

Step 4: Install Dlib

Just type in the following command to download and install the latest version of dlib from conda-forge repositories.

conda install -c conda-forge dlib

This will download all the required dependencies on its own. Just press ‘Y’ to proceed.

Step 5: Verify the installation

We will verify the dlib python API by importing the dlib library inside Python.

Open the Python interpreter by typing in ‘python’ inside the command prompt.

Then, type in the following code.

import dlib

Running above code should display the version of dlib, like ‘19.10’ as the output.

We may exit from the env_dlib by issuing command


This will migrate us back to the anaconda base.

Congrats for having install Dlib Python API on your computer.

Thanks for reading the post.

You may also like...

1 Response

  1. July 15, 2019

    […] How to install Dlib Python API on Windows PC […]

Leave a Reply

Your email address will not be published. Required fields are marked *

6 − 4 =