Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named 'dlib'

I am using windows 10 python 3.7.4

I have a code where it imports dlib

import dlib

But when I try to install it using pip install dlib it throws an error

ERROR : Command errored out with exit status 1 : 
......

I even tired installing cmake and This dlib file and tried to copy paste them into site-packages and tried

python setup.py install

It throws an error saying

CMake Error at CMakeLists.txt:3 (project):
      Failed to run MSBuild command:

What should be done to resolve this ??

Thanks to anyone who took time to read to this query and tired to solve this . Best of luck for your work :) ..

like image 263
WhiteBall Avatar asked Jan 01 '23 02:01

WhiteBall


2 Answers

If you get a fail error when trying to install, try the following:

Install CMAKE

pip install cmake

Then Install dlib

pip install dlib
like image 157
3kstc Avatar answered Jan 04 '23 02:01

3kstc


I finally found it .. We need to install visual studio build tools for C++ which will be around 4.53 GB . Then by using

pip install dlib

It was installed easily.

Thanks anyway

like image 36
WhiteBall Avatar answered Jan 04 '23 03:01

WhiteBall