Ask Your Question
0

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

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

Hello,

I compiled OpenCV from source following roughly the tutorial here: https://docs.opencv.org/master/d3/d52... 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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

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

See my comment in this post: https://github.com/opencv/opencv/issu...

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

Stats

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

Seen: 222 times

Last updated: Aug 23 '19