Skip to content Skip to sidebar Skip to footer

Why Pyqt5 Import Failed In Python3.4 With `importerror: Dll Load Failed` In Windows 7?

I have 32-bit Python2.7 already installed in Windows 7 (64-bit Operating System) and I can use it without any errors. Besides, I attempted to install 64-bit Python3.4 and PyQt5 in

Solution 1:

Too complex situation. You have 64-bit Windows, which can install both 64 and 32-bit software. So you can install both 2.x and 3.x in both variants. For each Python installation, there could be 4 type of PyQt available, 4 & 5, both in 32 and 64-bit version. So the possibility of error is 2 * 4 * 4 * 2 = 64 times complex. Jokes apart.

Let's look at the error:

ImportError: DLL load failed: %1isnot a valid Win32 application.

Let's break it down:

  • ImportError: Nature of error we are getting is Import related. Python is not able to load specified module(s). Let's move forward.
  • DLL load failed: This message more or less says that module was in form of .dll file.
  • %1 is not a valid Win32 application. This error has most of the info. %1, which is more like an argument representing PyQt5, is not a valid Win32 application.

By looking at the error, it can be seen that interpreter looking for a Win32 application, which simply means a 32-bit application. But why would interpreter want a 32-bit module? Guess? Because interpreter itself is 32-bit!

It can't yet be said that it is Python3 or Python2 interpreter because error only specifies 32 or 64-bit information. But in your case it's your Python 2 interpreter because it's only the 32-bit interpreter on your system.

Post a Comment for "Why Pyqt5 Import Failed In Python3.4 With `importerror: Dll Load Failed` In Windows 7?"