DLL loads failed when installing opencv

asked 2018-11-16 14:10:37 -0500

max4 gravatar image

I am trying to install opencv for python on my Windows 7 Service Pack 1 computer, and no matter what I try, I cannot get it to work. I have tried python 2.7, 3.6, and 3.7, both the anaconda distributions and the regular distributions. I was able to import numpy. I seem to be able to install opencv using pip, but cannot actually import it in python. The two errors I am getting most frequently are the

"DLL Load failled: %1 is not a valid Win32 application"

and

"DLL load failed: the specified module cannot be found"

when referring to 'from .cv2 import *' in the __init__.py file in the package. I have a feeling these are the same issue going by different names, given that I tried both the x86 and x64 versions of opencv and neither worked. I added the python DLL folder and the site-packages folder to the Path and that still didn't work. Every solution I have found online involves one of these fixes and/or some combination of install commands using pip, which I have tried and still nothing. I have uninstalled and reinstalled countless times and the same issues reoccur. If anyone has any idea how to fix this it would be greatly appreciated. I don't even care which version of python or which version of opencv I have to use--I just want to be able to use it.

edit retag flag offensive close merge delete