Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In pycharm ImportError: DLL load failed: The specified module could not be found. while importing facerecognition

I am getting this error while importing "face_recognition" in Pycharm but it runs perfectly fine from "anaconda command prompt". I don't understand why i am getting error in Pycharm but not in Anaconda cmd. I can successfully import cv2 in Pycharm. Can someone tell me how can i run it in pycharm? Below is complete error :-

Traceback (most recent call last):
File "C:/Users/r/PycharmProjects/Practise AI/check.py", line 1, in <module>
import face_recognition
File "C:\ProgramData\Anaconda3\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:\ProgramData\Anaconda3\lib\site-packages\face_recognition\api.py", line 3, in <module>
import PIL.Image
File "C:\ProgramData\Anaconda3\lib\site-packages\PIL\Image.py", line 64, in <module>
from . import _imaging as core
ImportError: DLL load failed: The specified module could not be found.
like image 854
Games Lover Avatar asked Mar 29 '19 14:03

Games Lover


People also ask

What is module not found error in Python?

The Python interpreter itself can run on almost all operating systems. Many users may use it on a Windows computer. But some users report that they have encountered module not found error Python. The error usually gives you the following message: ImportError: Dll Load Failed: The specified module could not be found.

How to solve importerror DLL load failed in Python?

To Solve ImportError: DLL load failed: The specified module could not be found Error You just need to Reinstall numpy the related packages. First of all uninstall numpy using this command. pip uninstall numpy .

Why am I getting library error when importing a library?

In most cases, the error occurs when you import a library. The cause of the error may be incorrect/incomplete installation or incompatibility of the library. In this case, you can try reinstalling the library to see whether the problem can be solved. Please refer to the following steps:


1 Answers

OK it finally worked after adding the anaconda interpreter in pycharm setting.

enter image description here

like image 74
Games Lover Avatar answered Sep 20 '22 14:09

Games Lover