How to install dlib library for Python in Windows 10

Hi! This is my first blog (or article depending on what you call) in English. Anyway, I am writing this blog because I have been facing with the trouble of this package for a while. I was trying to google it for the solution but I could not find the alternative one. So! this is my solution to install dlib library in Windows 10.

how to install dlib in windows 10 for python

Some people might say that why don’t you just use conda install which is already complied. It is much easy to install. Well… I agree and I could do it. However, other packages, such as face_recognition could not leverage dlib when you used conda install. Hence, we need to use pip install.

Preparation

First thing first, there are two things required (really need it indeed!).

  • CMake: This is because dlib was developed in C based programming language, so it needs this program to use it. It can be found in the link https://cmake.org/download/. To make sure matching with your operation system, in our case is Windows 10 64-bit version.

how to install dlib in windows 10 for python

how to install dlib in windows 10 for python

selected as your operation system being used

  • Visual studio: As I mentioned before, dlib is C based programming language. Another thing that really need is compiler. The Visual studio can be downloaded in the link https://visualstudio.microsoft.com/visual-cpp-build-tools/. After finishing the installation, you need to install additional packages for C, C++ programming, which is Packages CMake tools for Windows

how to install dlib in windows 10 for python

how to install dlib in windows 10 for python

make sure you selected in red box

Note

Sometimes we need manage the Windows PATH environment for CMake. (If you already added during installation, you can skip this section).

For checking whether the PATH already added or not, you can go to Environment Variables on Windows by go to This PC > Properties > Advance system settings. Then, go to Tab Advanced and click on Environment Variables.

Another windows will pop-up and click Edit…

how to install dlib in windows 10 for python

how to install dlib in windows 10 for python

If you are unable to find CMake path, you should add the CMake installed directory like image below.

how to install dlib in windows 10 for python

how to install dlib in windows 10 for python

Install

Everything is looking good so far. Now we can install dlib into our python environment. First of all, you need to install CMake library.

pip install cmake

Then, you can install dlib library using pip install.

pip install dlib

After passing enter, you laptop or desktop will run the C, C++ Compiler. If you got something like image below, you would be fine.

C, C++ is being used for program complying

how to install dlib ติดตั้ง dlib windows 10

how to install dlib ติดตั้ง dlib windows 10

boom! you got this!

After these all, you will get dilb installed on your Windows 10 by not using conda install compiler.

For further discussion or anyone would like to contact me. We could do it over the LinkdIn below.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值