. Advertisement .
..3..
. Advertisement .
..4..
Hi developer experts, I have a small but frustrating use case, and so far, I couldn’t get my head around this problem & ideal solution. I am running my command, and I am facing one problem with the importerror: dll load failed: %1 is not a valid win32 application. Below is the command I used:
Traceback (most recent call last):
File "C:\WorkSpace\Work\dev2qa.com-example-
code\PythonExampleProject\com\dev2qa\example\sqlite\SQLiteOperationExample.py",
line 7, in <module>
import sqlite3
File "C:\Program Files (x86)\Python37-32\lib\sqlite3\__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "C:\Program Files (x86)\Python37-32\lib\sqlite3\dbapi2.py", line 27, in <module>
from _sqlite3 import *
When I run it, I get the following error:
ImportError: DLL load failed: %1 is not a valid Win32 application.
I am looking forward to gaining some knowledge from all experts. Thank you, guys!
The cause: This error happens because your eclipse Pydev project uses python interpreter is a 32-bit version, and your Windows OS is a 64-bit version.
Solution:
Open a dos window and run the command python in it:
How To Set 64-bit Python As Eclipse Pydev Project Used Python Interpreter.
Check that your Python version is 64-bit. This could be the problem. This would mean that you would have used 32-bit Python and installed 64-bit binaries for OpenCV.