Open In App

How to Install dlib Library for python in windows 10

Last Updated : 17 Jul, 2022
Like Article

In this article, We are going to know how to install dlib library for Python in windows 10.

Dlib is one of the most powerful and easy-to-go open-source library consisting of machine learning library/algorithms and various tools for creating software. It was initially released in 2002. It has been used widely in many big industries, companies and for various big projects, etc. It also has many more types of algorithms that have a greater role in the real world.
Dlib is mostly used for face recognition purposes. They analyzed the object/face using the functions called HOG (Histogram of oriented gradients) and CNN (Convolutional Neural Networks). Face recognition nowadays are been used widely in many applications.

How to install dlib library.

First of all we have to set up the environment for the installation of dlib library. There are a few things that should be pre-installed before installing the dlib library. If these things aren’t properly installed or set up the dlib will not get installed properly. Let us see how we can do it.

Step 1: Install Python

Install Python on Windows. and after that to check whether Python is properly installed or not check the python version using the below command.

Python Installed Successfully

Step 2: Install CMake

Install CMake from its official website and make sure choose the right version according to your system configuration.


While installing CMake select Add CMake to the system PATH to avoid any error in the next steps. 


Step 3: Install visual studio.

Install the c++ compiler of the visual studio code community version. For that go to the visual studio code official website  and download the visual studio code community version after that as you can see in the below image, select Desktop development with c++ while installing VS code.

Installing Desktop development with c++

Step 4: Install cmake module.

After you have installed visual studio [Desktop development with c++] successfully, now go to your command prompt and type “pip install cmake”

install cmake

Step 5: Install dlib library.

After you have installed cmake module successfully, go ahead and install the dlib library as shown in below image.

install dlib

Now, the dlib library is installed successfully and to verify the installation of dlib library open command prompt and type the command as shown in the below image.

Verify dlib installation.

In the above code, we are importing dlib library and it is successfully imported without giving any error on the other hand “import numpy” gives an error because NumPy is not installed on the system.

Similar Reads

Eye blink detection with OpenCV, Python, and dlib
In this article, we are going to see how to detect eye blink using OpenCV, Python, and dlib. This is a fairly simple task and it requires you to have a basic understanding of OpenCV and how to implement face landmark detection programs using OpenCV and dlib, since we'll be using that as the base for today's project. Stepwise ImplementationStep 1: I
6 min read
OpenCV - Facial Landmarks and Face Detection using dlib and OpenCV
Content has been removed on Author's request.
1 min read
How to install python-binance Library on Windows?
In this article, we will be looking at the steps to install the python-binance library on windows. Python-binance is a python library used to automate interactions with Binance cryptocurrency exchange. Installing python-binance library on windows Follow the below steps to install python-binance library on windows: Step 1: Check if Python is install
2 min read
Create Homogeneous Graphs using dgl (Deep Graph Library) library
In this article, we will create Homogeneous Graphs using dgl (Deep Graph Library) library. Graphs are nothing but collections of Nodes/Vertices and Edges. Also, Edges are nothing but Source nodes to Destination nodes. So all edges can be represented as (U, V) where U and V are nodes. G = (V, E) Package Required pip install dglWhat is Deep Graph Lib
3 min read
How to install Librosa Library in Python?
Librosa is a Python package for music and audio analysis. Librosa is basically used when we work with audio data like in music generation(using LSTM's), Automatic Speech Recognition. It provides the building blocks necessary to create the music information retrieval systems. Librosa helps to visualize the audio signals and also do the feature extra
1 min read
How to Install python-nmap Library on Linux?
Python-Nmap is a network mapper that is exceptionally vital in handling security auditing and discovering the network. It exists as an open-source project; thus it is available for free. All the core operating systems support Python-Nmap. However, the binary packages are only available for Windows, Linux, and Mac OS X. Nmap is essential in port sca
5 min read
How to download and install Python Latest Version on Windows
Python is a widely-used general-purpose, high-level programming language. This article will serve as a complete tutorial on How to download and install Python latest version on Windows Operating System. Since windows don't come with Python preinstalled, it needs to be installed explicitly. In windows, there is no universal library for installing Py
2 min read
How to Install OpenCV for Python on Windows?
Prerequisite: Python Language Introduction OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a human.
2 min read
How to Install Python Tensorflow in Windows?
Tensorflow is a free and open-source software library used to do computational mathematics to build machine learning models more profoundly deep learning models. It is a product of Google built by Google’s brain team, hence it provides a vast range of operations performance with ease that is compatible with human behavior for ML and DL. It can run
3 min read
Convert Python Code to a Software to Install on Windows Using Inno Setup Compiler
Users are only given the installer for any kind of software, companies didn't give the source code file to the user. Although some open source software is available with its source code. We can also make an installer from our python source code so that you don't have to share your source code.Write your python code using any graphical library, i am
2 min read
Article Tags :
Practice Tags :