I have a situation very much like the one at ImportError: DLL load failed: %1 is not a valid Win32 application, but the answer there isn\'t working for me.
My Python
I got this error when trying to import MySQLdb.
What worked for me was to uninstall Python and then reinstall it.
I got the error after installing npm (https://www.npmjs.com/get-npm). One thing it did was install Python even though I already had it.
This has worked for me. I have tried different methods but this was my best solution.
Open command prompt and type the following;
pip install opencv-python
.
(make sure your internet is on).
after that try importing it again.
Update numpy.
pip install numpy --upgrade
Work for me!!
This one worked with me
pip install -- pywin32==227
It has a very simple solution.
After installing opencv
place
cv2.pyd
from C:\opencv\build\python\2.7\ **x64**
to C:\Python27\Lib\site-packages
instead of, place cv2.pyd
from C:\opencv\build\python\2.7\ **x86**
to C:\Python27\Lib\site-packages