0

I am using a windows computer. When I run the command(which is below) it does not work and says something about dlib. I looked at this stack overflow post but no answers worked:

Stackoverflow post

My install:

>>> pip install face-recognition

My code:


import face_recognition
image = face_recognition.load_image_file("your_file.jpg")
face_landmarks_list = face_recognition.face_landmarks(image)

error:

Traceback (most recent call last):
  File "main.py", line 1, in <module>
    import face_recognition
ModuleNotFoundError: No module named 'face_recognition'
  • face_recognition package requires dlib and it is a really heavy package and problematic to install. I recommend you to install deepface. It is tensorflow based library. In other words, it is easy to install and run. Besides, it wraps several state-of-the-art models: VGG, Google FaceNet, OpenFace, Facebook DeepFace. – johncasey Nov 14 '20 at 07:56
  • @johncasey When I install Dlib it raises an other error – Maryam Ibrahim Student Nov 17 '20 at 21:48

2 Answers2

0

Face_recognition package is not officially supported on Windows but it might be work, Here is the two way, You can install face_recognition package,

  1. For Windows 10, You can follow these steps,

https://github.com/ageitgey/face_recognition/issues/175#issue-257710508

  1. They are also providing ready-made virtual environment for this, So you can install it on your Windows system from here by using virualbox.

https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b

I know Windows is not supporting face_recognition package but I guess this will little bit help you.

Harnish Shah
  • 442
  • 3
  • 14
-3

It seems the package doesn't seem installed. You may be running in a different environment.

Dharman
  • 30,962
  • 25
  • 85
  • 135
akms
  • 51
  • 1
  • 5