question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import name deepface

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
wojtaasplcommented, Mar 27, 2021

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

1reaction
LiZhiHao97commented, Apr 6, 2021

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

Thank you. I made the same mistake.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name 'DeepFace' · Issue #3 - GitHub
Hello I tried install from pypi and git clone but I got this error, even I create new enviroment, any idea ?
Read more >
import error while import deepface in jupyter notebook
You have a typo. It should be from deepface import DeepFace per the documentation.
Read more >
ModuleNotFoundError: No module named 'deepface'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'deepface' How to remove the ModuleNot.
Read more >
deepface - PyPI
Deepface is a lightweight face recognition and facial attribute analysis (age, gender, emotion and race) framework for python. It is a hybrid face ......
Read more >
How to Fix : “ImportError: Cannot import name X” in Python
In Python "ImportError: cannot import name" error generally occurs when the imported class is not accessible, or the imported class is in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found