Announcement

Collapse
No announcement yet.

PySide module import error: DLL load failed: %1 is not a valid Win32 application

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    PySide module import error: DLL load failed: %1 is not a valid Win32 application

    I'm trying to make some simple UI tools in Unreal using PySide and Qt Designer. However I can't seem to be able to import any PySide modules. For instance, if I run this code:
    Code:
    import sys
    sys.path.append('C:/Python27/Lib/site-packages')
    from PySide import QtGui
    ...I always get this error:
    Code:
    LogPython: Error: ImportError: DLL load failed: %1 is not a valid Win32 application.
    I discovered I had a 32 bit version of Python 2.7 installed, so I initially thought the culprit could be a bit version mismatch issue between Python and PySide (32 bit Python with 64 bit PySide). I couldn't figure out how to check the bit version of PySide, so to be safe I reinstalled both Python and PySide using their 64 bit installers. But after doing that I still get the same error.

    Any ideas about what I'm doing wrong?

    #2
    I just pip installed PySide under the unreal engine installed python.

    Code:
    C:\Program Files\Epic Games\UE_4.21\Engine\Source\ThirdParty\Python\Win64>python -m pip install --upgrade pip
    C:\Program Files\Epic Games\UE_4.21\Engine\Source\ThirdParty\Python\Win64>python -m pip install PySide

    Comment


      #3
      Originally posted by cgsquirrel2 View Post
      I just pip installed PySide under the unreal engine installed python.

      Code:
      C:\Program Files\Epic Games\UE_4.21\Engine\Source\ThirdParty\Python\Win64>python -m pip install --upgrade pip
      C:\Program Files\Epic Games\UE_4.21\Engine\Source\ThirdParty\Python\Win64>python -m pip install PySide
      Thanks, that did the trick. I had not realised that UE was using its own Python installation instead of the one from the OS, which makes complete sense now that I think about it.

      Comment

      Working...
      X