Try updating cv2 to 4.2.0 Try installing opencv-contrib-python changing the line of code as " face_recognizer=cv2.face.L