# PySide2 dll error with python plugin

**URL:** <https://forums.unrealengine.com/t/pyside2-dll-error-with-python-plugin/465805>\
**Category:** Plugins\
**Tags:** Python, dll, unreal-engine, Plugins, question\
**Created:** [May 26, 2020, 2:05am UTC](https://forums.unrealengine.com/t/pyside2-dll-error-with-python-plugin/465805 "2020-05-26T02:05:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SVAD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SVAD](https://forums.unrealengine.com/u/SVAD)\
**Post date:** [May 26, 2020, 2:05am UTC](https://forums.unrealengine.com/t/pyside2-dll-error-with-python-plugin/465805/1 "2020-05-26T02:05:02Z")

</div>

I can’t get PySide2 to work with the official python plugin, and I there are a number of reasons I’d rather not build the engine from source.

The bundled python is compiled using MSC v.1500

```
2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)]

```

And the version of PySide I got from my conda env is also compiled against MSC v.1500

```
2.7.15 (default, Jul 2 2019, 00:55:11) [MSC v.1500 64 bit (AMD64)]

```

After setting up the environment, and appending the proper paths, I worked around a `ImportError: DLL load failed: The specified module could not be found.` by specifying the os.environ[“QT\_QPA\_PLATFORM\_PLUGIN\_PATH”] = PLATFORM\_PATH and os.environ[“QT\_DEBUG\_PLUGINS”] = ‘1’ and used DebugView to capture this error

```
[10204] loaded library "C:/Miniconda2/envs/nxt/Library/plugins/platforms/qwindows.dll"
[10204] QLibraryPrivate::loadPlugin failed on "C:/Miniconda2/envs/nxt/Library/plugins/platforms/qwindows.dll" : "Cannot load library C:\\Miniconda2\\envs\\nxt\\Library\\plugins\\platforms\\qwindows.dll: A dynamic link library (DLL) initialization routine failed."

```

This thread [https://forum.qt.io/topic/93085/qt-python-development-pyside2/8](https://forum.qt.io/topic/93085/qt-python-development-pyside2/8)

suggested that the `qwindows.dll` was mismatched, so I completely replaced the entire python install in the `C:\Program Files\Epic Games\UE_4.25\Engine\Binaries\ThirdParty\Python\Win64` with my conda version and I eliminated all duplicate `msvcr90.dll`. This ran just fine in ue4.25, but threw the same error.

I was able to trace the exact error code that the DLL load provided

```
ERROR_CLUSTER_OBJECT_ALREADY_USED
5936 (0x1730)
An attempt to use the specified cluster name failed because an enabled computer object with the given name already exists in the domain.

```

(I’m over my head going any further with Dependency walker.)

My best guess is that unreal complies against some other version of `msvcr90.dll` which causes the dll load to fail. The 20tab unoffical UnrealEnginePython has PySide2 bundled, but since their megagrant was denied, they’ve stopped development.

Can anyone shed light on what is happening, or point me to a version of Qt or PySide2 that works with the official unreal python script plugin?

Thanks, Zach

---

<div class="post-metadata">

**Author:** ![Fabian\_Elmers](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fabian\_Elmers](https://forums.unrealengine.com/u/Fabian_Elmers)\
**Post date:** [September 21, 2020, 6:54pm UTC](https://forums.unrealengine.com/t/pyside2-dll-error-with-python-plugin/465805/2 "2020-09-21T18:54:04Z")

</div>

Did you ever get this sorted? When I was trying to use PySide2 I was getting the same dll error. I resorted back to python 2.7 PySide from pip. But I wanted to use PySide2 that comes with conda, I tried recompiling the engine to point to my conda install Python, which worked for the Python install, but when I tried to load PySide2 the dll error popped up.
