Ask Your Question

Revision history [back]

Python Bindings for OpenCV 4.1.1 reports DLL not found on Windows 10

Hello,

I compiled OpenCV from source following roughly the tutorial here: https://docs.opencv.org/master/d3/d52/tutorial_windows_install.html using Visual Studio 19 with PYTHON 3.7 (No Python 2).

I built the BUILD ALL target and it reported all successful. Done the same for INSTALL target.

Now when I open the python interpreter and run:

import cv2

It gives me the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python37\lib\site-packages\cv2\__init__.py", line 89, in <module>
    bootstrap()
  File "C:\Python37\lib\site-packages\cv2\__init__.py", line 79, in bootstrap
    import cv2
ImportError: DLL load failed: The specified module could not be found.

I tried to trace it by checking the __init__.py file, Dependency Walker, and several other trials, but to no luck.

Is there anyway of tracing back this error by any means? Thanks.