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:
from PySide import QtGui
…I always get this error:
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.
To make it short, it means that you lacked some “dependencies” for the libraries you wanted to use. This is a common problem when installing python packages, mainly in windows. Before trying to use any kind of library, first it is suggested to look up whether it needs another library in python “family”.
The solution is to provide the python interpreter with the path-to-your-module/library. The simplest solution is to append that python path to your sys.path list. In your notebook, first try: