deepface: Cannot import name deepface

Hi there!

I have ran into a similar issue as the previous guy and have also did the same things. But i’m running on Mac OS.

ImportError: cannot import name ‘DeepFace’ from ‘deepface’ (/Users/oha/anaconda3/lib/python3.7/site-packages/deepface/init.py)

!pip install deepface
from deepface import DeepFace
import cv2
import matplotlib.pyplot as plt
from tensorflow import keras

Requirement already satisfied: deepface in /Users/oha/anaconda3/lib/python3.7/site-packages (0.0.9)
Requirement already satisfied: gdown>=3.10.1 in /Users/oha/anaconda3/lib/python3.7/site-packages (from deepface) (3.10.1)

Any idea how to fix this?

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

I`ve had same problem. Rename your project file from deepface.py e.g. on deepface2.py 😃

I`ve had same problem. Rename your project file from deepface.py e.g. on deepface2.py 😃

Thank you. I made the same mistake.