I have this issue where I try to import cv2 on python and get the following error message.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: %1 is not a valid Win32 application.
I do understand there are many posts about this where it is suggested that the bitness of the package is different from the python package.
However, everything I am running is 64 bits. I am on win7 64 bits, I have the winpython 2.7.3.3, 64 bits distribution, and I compiled opencv in 64 bits with the instruction provided here and placed the cv2.pyd dll in the Lib/site-packages folder of python.
Unfortunately the suggestion of using the 32 bits version of python isn't working for me anymore as I have to handle numpy arrays too large for 32 bits.
Thanks!!!
------ UPDATE
The only thing missing was to add the new opencv binaries path (C:\opencv\build\bin\Release) to the Windows PATH environment variable, restart python.
Everything seems to be working fine now!