Click here to Skip to main content
15,911,762 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am working on drivers drowsiness detection project but unfortunately, it's not working it shows error regarding dilib library so please can any one suggest other better option

What I have tried:

I tried with dilib library but it's not working properly it shows error
Posted
Comments
Dave Kreskowiak 4-Sep-22 23:31pm    
Sigh... and the error would be .... ???
Richard MacCutchan 5-Sep-22 4:01am    
Your title and question suggest different problems; which is correct?

1 solution

Step 1.Install Python on your OS.
After that to check whether Python is properly installed or not check the python version in cmd/terminal/powershell using the command:- <big>python --version</big> and hit Enter

Step 2: Install CMake.
Install CMake from its official website https://cmake.org/download/ and make sure choose the right version according to your system configuration eg:- x64.
While installing CMake select Add CMake to the system PATH to avoid any error in the next steps.


Step 3: Install visual studio.[Desktop development with c++]
Install the c++ compiler of the visual studio code community version. For that go to the visual studio code official website https://visualstudio.microsoft.com/visual-cpp-build-tools/ 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.

Step 4: Install cmake module.
After you have installed visual studio [Desktop development with c++] successfully, now go to your command prompt/terminal/powershell and type “pip install cmake” and hit Enter

After you have installed cmake module successfully, go ahead and install the dlib library using command prompt/terminal/powershell and type “pip install dlib” .

Now, the dlib library is installed successfully and to verify the installation of dlib library open command prompt/terminal/powershell and type “python” hit Enter. Then import dlib hit Enter again. >

If you get ModuleNotFoundError, Please follow the above steps properly.
 
Share this answer
 
v3
Comments
Richard MacCutchan 6-Sep-22 12:17pm    
Why do you need CMake to run a Python program?
PIEBALDconsult 6-Sep-22 12:30pm    
I expect a spammy payload to follow.
Richard MacCutchan 6-Sep-22 14:35pm    
OP has posted what looks like a valid question; but who knows ...
pleasetextme please 6-Sep-22 23:52pm    
CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice.
PIEBALDconsult 7-Sep-22 12:58pm    
Which I think is why Richard asked the question. You don't compile Python programs.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900