ageitgey / face_recognition

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

Unable to import face_recognition #856

Open yarin177 opened 5 years ago

yarin177 commented 5 years ago

Description

I am trying to import face_recognition after i "successfully" installed it.

What I Did

C:\Users\ירין>pip install face_recognition Requirement already satisfied: face_recognition in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (1.2.3) Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (0.3.0) Requirement already satisfied: Pillow in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (5.3.0) Requirement already satisfied: Click>=6.0 in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (7.0) Requirement already satisfied: numpy in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (1.15.4) Requirement already satisfied: dlib>=19.7 in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (19.7.0) You are using pip version 18.1, however version 19.1.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\ירין>pip install cmake Requirement already satisfied: cmake in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (3.14.4) You are using pip version 18.1, however version 19.1.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\ירין>pip install dlib Requirement already satisfied: dlib in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (19.7.0) You are using pip version 18.1, however version 19.1.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command

Then when i am trying to import it..

import face_recognition Traceback (most recent call last): File "", line 1, in File "C:\Users\ירין\AppData\Local\Programs\Python\Python36\lib\site-packages\face_recognition__init__.py", line 7, in from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance File "C:\Users\ירין\AppData\Local\Programs\Python\Python36\lib\site-packages\face_recognition\api.py", line 17, in pose_predictor_68_point = dlib.shape_predictor(predictor_68_point_model) RuntimeError: Unable to open C:\Users\ירין\AppData\Local\Programs\Python\Python36\lib\site-packages\face_recognition_models\models\shape_predictor_68_face_landmarks.dat

rafayk7 commented 5 years ago

Try installing with pip3 instead of pip.

Do pip3 install face_detection and see if it works.

yarin177 commented 5 years ago

Try installing with pip3 instead of pip.

Do pip3 install face_detection and see if it works.

Did you mean "pip3 install face_recognition" because "face_detection" is not a module?

rafayk7 commented 5 years ago

Try installing with pip3 instead of pip. Do pip3 install face_detection and see if it works.

Did you mean "pip3 install face_recognition" because "face_detection" is not a module?

Haha my bad! Yes, face_recognition haha. Let me know if using pip3 worked.

yarin177 commented 5 years ago

Try installing with pip3 instead of pip. Do pip3 install face_detection and see if it works.

Did you mean "pip3 install face_recognition" because "face_detection" is not a module?

Haha my bad! Yes, face_recognition haha. Let me know if using pip3 worked.

Unfortunately same result

rrajnidhi commented 4 years ago

Same issue with me here. I even tried installing _pip3 install facerecognition yet getting an error while importing. But in terminal ~/Desktop/python/vid_recog$ face_recognition is working

ujwalakoriraj commented 4 years ago

I am facing the same issue. Has anyone solved this?

ChandraSekhar777 commented 4 years ago

I am facing the same issue. Has anyone solved this?

Watch this Video https://www.youtube.com/watch?v=xaDJ5xnc8dc
You will get an idea.

ujwalakoriraj commented 4 years ago

Will do. Thank you.

hritik-111 commented 1 year ago

Try installing with pip3 instead of pip.

Do pip3 install face_detection and see if it works.

this worked for me thank you.