Important: Please read the Qt Code of Conduct -

PyQt / Python 32-bit 64-bit mismatch causing dll loading error ("Not a valid Win32 application")

  • I'm running on a Win x64 machine, trying to use LoadLibrary to call a dll function, but I'm getting a '%1 is not a valid Win32 application' error.

    Not sure if the dll is 32-bit or 64-bit, or if __cdecl was used, or anything else about it..

    To make matters worse, I dont know if I have the 32-bit or 64 bit version of PyQt5 / Python3.4 installed. Is it even possible to mix & match a 64bit PyQt with a 32-bit Python, or vice versa?

    Is there a way to see what bit versions of PyQt and Python I'm running? I'm hoping that they match, and that switching to the other bit version will resolve the dll error.

  • Lifetime Qt Champion


    No you can't mix different architectures. You can use Dependency Walker to get more information about the dlls and executables

Log in to reply