How do I fix DLL load failed import errors | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How do I fix DLL load failed import errors

I started learning about computer visions and found a module (open_cv) which could make this work So I install open_cv in my pycharm terminal and the installation was successful but whenever I import cv2 and run it, I keep getting this error: From .cv2 import * ImportError: DLL load failed: The specified module could not be found. I checked for the path where the cv2 was installed and behold the cv2 folder was absent. I use windows 10 with my python version 3.7.1 I tried it on a windows 7 earlier and thought that was the problem but obviously not. I think have tried all I could and now am here seeking for professional advice

30th Nov 2018, 8:06 AM
Ganiyu Olalekan
Ganiyu Olalekan - avatar
1 Answer
+ 2
While this thread might help you: https://stackoverflow.com/questions/43184887/dll-load-failed-error-when-importing-cv2 ...I had an issue with it because at least one commenter suggests copying the DLL into system folders (which...I don't like that...you want to register DLLs where they LIVE, not relocate them / mess with system directories) so this thread may be better because it has at least one example of registering the right DLL: https://github.com/skvark/opencv-JUMP_LINK__&&__python__&&__JUMP_LINK/issues/36 There are other answers there, but if you use the "regsvr32" one, I believe it can be used where the DLL is, instead of having to put it in system folders and then forget about it / leading to conflicts later.
30th Nov 2018, 6:44 PM
Kirk Schafer
Kirk Schafer - avatar