UE5 Python - PySide Import crashes the engine

Hello everybody!

I wonder if anyone has experience with running PySide on unreal engine 5 scripting?

I’ve been trying it lately, but I can’t get past the import statement.

e.g. a simple script:

from PySide6 import QtWidgets, QtUiTools

crashes the engine generating the following log:

LoginId:9403ea7cac405aff5457b2ae725a0a02
EpicAccountId:3af3adf9691444c8aba8cf9969b8269a

Caught signal

Unknown() Address = 0x7ff812427dd7 (filename not found) [in libdispatch.dylib]
Unknown() Address = 0x7ff812427d74 (filename not found) [in libdispatch.dylib]
Unknown() Address = 0x7ff81b7b78d1 (filename not found) [in HIToolbox]
Unknown() Address = 0x7ff81b7b9dce (filename not found) [in HIToolbox]
Unknown() Address = 0x7ff81b7c7426 (filename not found) [in HIToolbox]
Unknown() Address = 0x1fc07760f (filename not found) [in libqcocoa.dylib]
Unknown() Address = 0x1fc07757f (filename not found) [in libqcocoa.dylib]
Unknown() Address = 0x1fc0786a5 (filename not found) [in libqcocoa.dylib]
Unknown() Address = 0x1fc05dd7e (filename not found) [in libqcocoa.dylib]
QPlatformIntegrationFactory::create(QString const&, QList<QString> const&, int&, char**, QString const&) Address = 0x21b419136 (filename not found) [in QtGui]
Unknown() Address = 0x21b3e7faf (filename not found) [in QtGui]
QGuiApplicationPrivate::createPlatformIntegration() Address = 0x21b3e768c (filename not found) [in QtGui]
QGuiApplicationPrivate::createEventDispatcher() Address = 0x21b3e9d6b (filename not found) [in QtGui]
QCoreApplicationPrivate::init() Address = 0x21a53252a (filename not found) [in QtCore]
QGuiApplicationPrivate::init() Address = 0x21b3e38b9 (filename not found) [in QtGui]
QApplicationPrivate::init() Address = 0x256c82a82 (filename not found) [in QtWidgets]
QApplicationConstructor(_object*, _object*, QApplicationWrapper**) Address = 0x259e48150 (filename not found) [in QtWidgets.abi3.so]
Sbk_QApplication_Init(_object*, _object*, _object*) Address = 0x259e44f57 (filename not found) [in QtWidgets.abi3.so]
type_call Address = 0x1c3defa26 (filename not found) [in libpython3.9.dylib]
_PyObject_MakeTpCall Address = 0x1c3da83cc (filename not found) [in libpython3.9.dylib]
call_function Address = 0x1c3e465c5 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalFrameDefault Address = 0x1c3e45122 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalCode Address = 0x1c3e46847 (filename not found) [in libpython3.9.dylib]
PyEval_EvalCode Address = 0x1c3e3d280 (filename not found) [in libpython3.9.dylib]
builtin_exec Address = 0x1c3e3b161 (filename not found) [in libpython3.9.dylib]
cfunction_vectorcall_FASTCALL Address = 0x1c3ddce92 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalFrameDefault Address = 0x1c3e45326 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalCode Address = 0x1c3e46847 (filename not found) [in libpython3.9.dylib]
_PyFunction_Vectorcall Address = 0x1c3da8e32 (filename not found) [in libpython3.9.dylib]
call_function Address = 0x1c3e46540 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalFrameDefault Address = 0x1c3e45122 (filename not found) [in libpython3.9.dylib]
_PyFunction_Vectorcall Address = 0x1c3da8d7b (filename not found) [in libpython3.9.dylib]
call_function Address = 0x1c3e46540 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalFrameDefault Address = 0x1c3e4508f (filename not found) [in libpython3.9.dylib]
_PyFunction_Vectorcall Address = 0x1c3da8d7b (filename not found) [in libpython3.9.dylib]
call_function Address = 0x1c3e46540 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalFrameDefault Address = 0x1c3e45158 (filename not found) [in libpython3.9.dylib]
_PyFunction_Vectorcall Address = 0x1c3da8d7b (filename not found) [in libpython3.9.dylib]
call_function Address = 0x1c3e46540 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalFrameDefault Address = 0x1c3e45158 (filename not found) [in libpython3.9.dylib]
_PyFunction_Vectorcall Address = 0x1c3da8d7b (filename not found) [in libpython3.9.dylib]
object_vacall Address = 0x1c3daa00e (filename not found) [in libpython3.9.dylib]
_PyObject_CallMethodIdObjArgs Address = 0x1c3daa29a (filename not found) [in libpython3.9.dylib]
PyImport_ImportModuleLevelObject Address = 0x1c3e62c82 (filename not found) [in libpython3.9.dylib]
builtin___import__ Address = 0x1c3e3a579 (filename not found) [in libpython3.9.dylib]
cfunction_call Address = 0x1c3ddd559 (filename not found) [in libpython3.9.dylib]
_PyObject_Call Address = 0x1c3da8b8d (filename not found) [in libpython3.9.dylib]
_PyEval_EvalFrameDefault Address = 0x1c3e45326 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalCode Address = 0x1c3e46847 (filename not found) [in libpython3.9.dylib]
_PyFunction_Vectorcall Address = 0x1c3da8e32 (filename not found) [in libpython3.9.dylib]
call_function Address = 0x1c3e46540 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalFrameDefault Address = 0x1c3e45158 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalCode Address = 0x1c3e46847 (filename not found) [in libpython3.9.dylib]
_PyFunction_Vectorcall Address = 0x1c3da8e32 (filename not found) [in libpython3.9.dylib]
object_vacall Address = 0x1c3daa00e (filename not found) [in libpython3.9.dylib]
_PyObject_CallMethodIdObjArgs Address = 0x1c3daa29a (filename not found) [in libpython3.9.dylib]
PyImport_ImportModuleLevelObject Address = 0x1c3e62cfd (filename not found) [in libpython3.9.dylib]
_PyEval_EvalFrameDefault Address = 0x1c3e437f2 (filename not found) [in libpython3.9.dylib]
_PyEval_EvalCode Address = 0x1c3e46847 (filename not found) [in libpython3.9.dylib]
PyEval_EvalCode Address = 0x1c3e3d280 (filename not found) [in libpython3.9.dylib]
FPythonScriptPlugin::EvalString(char16_t const*, char16_t const*, int, _object*, _object*) Address = 0x1bfc8ae61 (filename not found) [in UnrealEditor-PythonScriptPlugin.dylib]
FPythonScriptPlugin::RunFile(char16_t const*, char16_t const*, FPythonCommandEx&) Address = 0x1bfc8385b (filename not found) [in UnrealEditor-PythonScriptPlugin.dylib]
FPythonScriptPlugin::ExecPythonCommandEx(FPythonCommandEx&) Address = 0x1bfc830fa (filename not found) [in UnrealEditor-PythonScriptPlugin.dylib]
FPythonScriptPlugin::ExecPythonCommand(char16_t const*) Address = 0x1bfc82d5c (filename not found) [in UnrealEditor-PythonScriptPlugin.dylib]
TBaseFunctorDelegateInstance<void (), FDefaultDelegateUserPolicy, FPythonScriptPlugin::PopulatePythonFileContextMenu(UToolMenu*)::$_123>::ExecuteIfSafe() const Address = 0x1bfcb4daa (filename not found) [in UnrealEditor-PythonScriptPlugin.dylib]
SMenuEntryBlock::OnClicked(bool) Address = 0x112131cb1 (filename not found) [in UnrealEditor-Slate.dylib]
SMenuEntryBlock::OnMenuItemButtonClicked() Address = 0x112121e53 (filename not found) [in UnrealEditor-Slate.dylib]
TBaseSPMethodDelegateInstance<false, SMenuEntryBlock, (ESPMode)1, FReply (), FDefaultDelegateUserPolicy>::Execute() const Address = 0x11219c92d (filename not found) [in UnrealEditor-Slate.dylib]
SButton::ExecuteOnClick() Address = 0x1121b8a25 (filename not found) [in UnrealEditor-Slate.dylib]
SButton::OnMouseButtonUp(FGeometry const&, FPointerEvent const&) Address = 0x1121da774 (filename not found) [in UnrealEditor-Slate.dylib]
SMenuEntryButton::OnMouseButtonUp(FGeometry const&, FPointerEvent const&) Address = 0x11219e5f6 (filename not found) [in UnrealEditor-Slate.dylib]
FSlateApplication::RoutePointerUpEvent(FWidgetPath const&, FPointerEvent const&) Address = 0x111fa648a (filename not found) [in UnrealEditor-Slate.dylib]
FSlateApplication::ProcessMouseButtonUpEvent(FPointerEvent const&) Address = 0x111f6267b (filename not found) [in UnrealEditor-Slate.dylib]
FSlateApplication::OnMouseUp(EMouseButtons::Type, UE::Math::TVector2<double>) Address = 0x111fb01f6 (filename not found) [in UnrealEditor-Slate.dylib]
FMacApplication::ProcessMouseUpEvent(FDeferredMacEvent const&, TSharedPtr<FMacWindow, (ESPMode)1>) Address = 0x10a2a304a (filename not found) [in UnrealEditor-ApplicationCore.dylib]
FMacApplication::ProcessEvent(FDeferredMacEvent const&) Address = 0x10a29d2fc (filename not found) [in UnrealEditor-ApplicationCore.dylib]
FMacApplication::ProcessDeferredEvents(float) Address = 0x10a29d07f (filename not found) [in UnrealEditor-ApplicationCore.dylib]
FSlateApplication::TickPlatform(float) Address = 0x111f7b9c7 (filename not found) [in UnrealEditor-Slate.dylib]
FSlateApplication::Tick(ESlateTickType) Address = 0x111f7af15 (filename not found) [in UnrealEditor-Slate.dylib]
FEngineLoop::Tick() Address = 0x10098ebba (filename not found) [in UnrealEditor]
GuardedMain(char16_t const*) Address = 0x10099b992 (filename not found) [in UnrealEditor]
-[UEAppDelegate runGameThread:] Address = 0x1009b7033 (filename not found) [in UnrealEditor]
-[FCocoaGameThread main] Address = 0x10b21f561 (filename not found) [in UnrealEditor-Core.dylib]
Unknown() Address = 0x7ff8134349c4 (filename not found) [in Foundation]
_pthread_start Address = 0x7ff8125dd4e1 (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7ff8125d8f6b (filename not found) [in libsystem_pthread.dylib]

Any idea? I don’t think I need to recompile PySide but I might be wrong.
I had few experiences with having to recompile python modules for DCCs such as Mobu or Maya, because of the differences in the compiler used to compile Python, but Python in UE5 seems to be using the same Python3 vanilla compiler, therefore no custom compiling should be needed?

I am on Unreal Engine 5.0.3 on MacBook.

Thanks!