Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DLL load failed error when importing cv2

Tags:

python

opencv

cv2

I have installed opencv on my windows machine using python 3.6 without any issues, using:

pip install opencv-python 

but when I try to import cv2 I get the following error

ImportError: DLL load failed: The specified module could not be found. 

I have seen this post

It says cv2 doesn't work with python 3 I was wondering if this has been fixed or if there is a way around it

like image 363
Cameron Wasilewsky Avatar asked Apr 03 '17 12:04

Cameron Wasilewsky


People also ask

How do I fix import cv2 error?

importerror no module named cv2 error occurs when cv2 module is not properly installed or its path is not properly set or configured. The straight way fix for this error (no module named cv2) is to reinstall this module (OpenCV-python). In some scenario reinstalling this module automatically remove the older version.

How do you solve Importerror DLL load failed the specified module could not be found?

importerror: dll load failed: The specified module could not be found error occurs because of the incompatibilities of Microsoft Visual C++ (Visual studio) versions. The best way to fix this error (importerror: dll load failed) is to reinstall/ install the Microsoft Visual C++ distribution.


1 Answers

I took a lot of time to solve this error! Run command

pip install opencv-contrib-python 
like image 163
tientuyen07 Avatar answered Sep 28 '22 08:09

tientuyen07