Ask Your Question

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

asked 2019-08-23 03:44:08 -0500


I compiled OpenCV from source following roughly the tutorial here: 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\", line 89, in <module>
  File "C:\Python37\lib\site-packages\cv2\", 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 file, Dependency Walker, and several other trials, but to no luck.

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2020-08-28 18:36:47 -0500

See my comment in this post:

But practically the workaround i found is to do pip install opencv-python and then pip uninstall opencv-python

That's because this will use the loaders by the last install as i explained.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-08-23 03:44:08 -0500

Seen: 245 times

Last updated: Aug 23 '19