DLL load failed while importing _dlib_pybind11: A dynamic link library (DLL) initialization routine failed.
- face_recognition version: 1.3.0
- Python version: 3.7
- Operating System: Windows 10
Description
Trying to implement face_recognition library and when i isntalled it from pip there i am getting this error when i try to run my script
What I Did
I imported dlib from conda and face_Recognition through pip. When i run my script i am getting this error: DLL load failed while importing _dlib_pybind11: A dynamic link library (DLL) initialization routine failed.
This is the whole stacktrace
Traceback (most recent call last):
File "C:/Users/***/PycharmProjects/pythonProject/CameraLib.py", line 4, in <module>
import face_recognition
File "C:\Users\***\anaconda3\envs\pythonProject\lib\site-packages\face_recognition\__init__.py", line 7, in <module>
from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
File "C:\Users\***\anaconda3\envs\pythonProject\lib\site-packages\face_recognition\api.py", line 4, in <module>
import dlib
File "C:\Users\***\anaconda3\envs\pythonProject\lib\site-packages\dlib\__init__.py", line 19, in <module>
from _dlib_pybind11 import *
ImportError: DLL load failed while importing _dlib_pybind11: A dynamic link library (DLL) initialization routine failed.
Hey! MrMake i think that u should try installing both dlib and facerecognition through same idle ( different idle may create some problems ) and i think that u don't have to install dlib seperately ( atleast for version 3.19.0 ) its already included in face_recognition library , further check if u have all necessary library installed such as Click,CMake, opencv , numpy it favours in installation( recommended - try to use latest ve5sion of python(3.9.0)) ( Furthermore if you are installing it in visual studio code terminal make sure that you have have visual studio community installed )
I had a similar problem with the line 19 "from _dlib_pybind11 import *" in Ubuntu.
Any solution around there? @MrMak21 did you fix that?
@dofamin-1 yes i found that the problem was with my proccesor. It didn't support these operations. When i changed and test this on another pc with intel xeon it was running perfect
Same here in my case...