ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
53.37k stars 13.48k forks source link

I keep getting errors while installing dlib and face_recognition. #1007

Open shanksghub opened 4 years ago

shanksghub commented 4 years ago

### Description

Describe what you were trying to get done. I want to use face_recognition to recognize faces from my webcam but i can't install face_recognition and dlib.i even reinstalled python and deleted packages.I keep getting errors.

Please look at the pictures for the errors and tell me how to fix them.

Screenshot (1) Screenshot (2) Screenshot (3) Screenshot (4) Screenshot (5)

i reinstalled python,deleted packages but same errors.

mowshon commented 4 years ago

You don't have cmake installed. Even your screenshots tells you about that issue. https://cmake.org/download/

shanksghub commented 4 years ago

@mowshon the errors remain the same inspite of installing cmake. Neither would upgrading python or pipi resolve that I think. Screenshot (14)

bomei commented 4 years ago

@shanksghub I suggest you to find a compiled dlib wheel for you specific python version to install, just google it. And some libs may not support 3.8 well now, suggest to use 3.7 for this moment.

mowshon commented 4 years ago

@shanksghub, the problem is still in your cmake. I think the problem is in your PATH, you didn't set him.

Also, I think you have been ignore this step: Choose: "Add CMake to the system PATH for all users"

image

Remove your cmake, and reinstall: https://tulip.labri.fr/TulipDrupal/?q=node/1081

shanksghub commented 4 years ago

@mowshon Okay.thank you..i'll do as you told..I have been installing cmake by doing pip install cmake till now

shanksghub commented 4 years ago

@bomei sounds like a solution..thanks :)

siyangxie commented 4 years ago

pip install cmake or pip3 install cmake if you're on python 3.x

shanksghub commented 4 years ago

@SiyangXie till now i did pip install cmake,i uninstalled it and dowloaded the zip file from the link given above..let's see how this goes

shanksghub commented 4 years ago

Screenshot (15)

I don't know what to do after the i reach here in the above picture..i am going to use open cv manual installation..hope that works fine

siyangxie commented 4 years ago

@SiyangXie till now i did pip install cmake,i uninstalled it and dowloaded the zip file from the link given above..let's see how this goes

I wouldn't recommend to install opencv from scratch. It's always a pain in the ass... Another easy way to produce this environment is to use Anaconda. You can install cmake from Anaconda and go pip install opencv-python after then. Don't forget to set up Anaconda as your project environment. Anaconda

felixagbavor commented 4 years ago

if you are still getting the error. here is what worked for me on windows using command line(I'm assuming you have python already installed);

Download the latest version of visual studio. Select and download C++ Clang compiler(should be under the compiler sub-section) in the individual component header section.

Do these installs from cmd using pip: pip install opencv-python pip install cmake pip install boost pip install face_recognition

NB: it took about 5-6 mins for dlib package to install through face_recognition on my computer, just fyi.

alessiosavi commented 4 years ago

Try this solution: https://stackoverflow.com/questions/49731346/compile-dlib-with-cuda/57592670#57592670

root-Akshay commented 4 years ago
  1. pip install CMake.
  2. Install VS community and under individual components -choose Visual C++ tools for CMake. Click here to download VS installer

image

  1. pip install face_recognition.

I know this method install's cmake twice but it works.

ps: pip install face_recognition will take a lot of time so be patient

Suchir2004 commented 1 year ago

Download the dlib files Link - https://drive.google.com/file/d/11Hip8-llWEm5GN3_u4ibI09unL7xCw0g/view?usp=drivesdk And just copy the path of that file and paste it into the terminal. Stable version is 10 among all files that you have been downloaded from the link

In terminal you just need copy the path of that particular file; there are 4 files the choose one which is suitable for your computer work on windows.