简体   繁体   中英

No module name 'face_recognition' windows

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 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM