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

倖福魔咒の 提交于 2021-01-22 07:52:43

问题


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.

回答1:


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



来源:https://stackoverflow.com/questions/55419368/in-pycharm-importerror-dll-load-failed-the-specified-module-could-not-be-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!