Ask Your Question

Shrinjay's profile - activity

2020-11-18 14:09:16 -0600 received badge  Enthusiast
2020-11-16 00:23:20 -0600 marked best answer At my Wit's End with OpenCV Build from Source, Please Help.

Hey all,

As the title says, I'm getting increasingly annoyed with building opencv from source. I can't just use a python wheel as I require gstreamer support, so it seems the only way to do this is build from source.

The error I'm getting is: "ImportError: DLL load failed while importing cv2: The specified module could not be found." when I try to importcv2.

I've googled the error, taken steps that have been recommended there (see below), but nothing seems to work.

Steps I've taken: 1. Downloaded the opencv 4.40 binary, have also tried with 4.50. Generated with CMAKE using correct paths to python installation, include dirs, library etc. 2. Built and installed in VS2019 in Release Mode for x64. 3. Copied cv2.pyd to my Python38/Lib/site-packages directory.

Attempts to Resolve:

  • Built from a wheel and then uninstalled wheel to get dll files required, no avail. Installed and uninstalled opencv-python with pip to get dll files, no avail.

  • Checked with DependencyWalker, saw opencv450_world.dll was missing,tracked it down inopencv/build/x64/vc15/bin and copied it to Python38/DLL, and failing that, site-packages.
  • Copied init.py, configure.py and configure_load.py to
    site-packages, resulted in recursion error.
  • Tried with python 2.7, same error.
  • Tried a clean install of both
    python versions then repeating steps above, no avail.
  • Tried different versions of opencv, 4.50 and 4.10, no avail.

Any other suggestions? I'd be happy to pull more logs if you'd like. However, the CMake and VS processes run without a hitch.

Seriously, thanks so much in advance.

Kind Regards, Shrinjay

2020-11-16 00:23:20 -0600 received badge  Scholar (source)
2020-11-16 00:23:13 -0600 commented answer At my Wit's End with OpenCV Build from Source, Please Help.

If I could hug you, I would right now. Thank you so, so, so, very much. That was a clear explanation and I realized all

2020-11-14 12:34:55 -0600 commented answer At my Wit's End with OpenCV Build from Source, Please Help.

I see. I've got those libs in python37/DLLs, as well I copied all the DLLs from vc16/bin right into the cv2.pyd director

2020-11-14 10:33:13 -0600 commented answer At my Wit's End with OpenCV Build from Source, Please Help.

Which DLLs? opencvworld_450 and the DLLs in install/vc16/bin? I have both VC16/bin and lib in my environment PATH. Am I

2020-11-13 14:55:19 -0600 asked a question At my Wit's End with OpenCV Build from Source, Please Help.

At my Wit's End with OpenCV Build from Source, Please Help. Hey all, As the title says, I'm getting increasingly annoy