PDA

View Full Version : PyQt5 This application failed ... not find or load the Qt platform plugin "windows"



Tiles
9th May 2016, 10:38
Hello everybody,

Absolute beginner with PyQt. And already stopped after the installation. I have run into the "This application failed to start because it could not find or load the Qt platform plugin "windows" " error.

First what i try to do: i try to run PyQt5 in the 3d software Blender to create a tool panel there. For that i installed PyQt5 directly in Blender into the python directory. The PyQt5 folder is in 2.76\python\lib\site-packages\ . That way PyQt5 gets at least found. Which should be good enough to get started with some first experiments.

Unfortunately Blender crashes with the above error when i try to run the first simple script from the PyQt5 introduction tutorial in Blender. The script can be found here: http://zetcode.com/gui/pyqt5/introduction/

It also crashes with other simple scripts of that kind. So the problem seems not the script.

What i tried so far:

Gooled my ass off. Came up with the usual solutions to place libEGL.dll and qwindowsd.dll into the application path. Problem is, they already exists in the needed paths, they are part of the PyQt5 installation. As told, i have installed PyQt5 directly into the python/lib/site-packages directory for now. qwindows.dll is for example in 2.76\python\lib\site-packages\PyQt5\plugins\platforms\ . And i don't know where i should place those files elsewhere. Not that i haven't tried, but the effect was always the same.

And that was basically what i have found as a possible solution. Which has lead me to this forum now.

Blender Version: 2.76b
Blenders internal Python version is 3.4.2 (default, Dec 7 2014, 18:21:18) [MSC v.1800 64 bit (AMD64)]
PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x64.exe (64 bit because i use 64 Bit Blender here. Problem?)
Windows 7 home

The qt.conf is in \2.76\python


[Paths]
Prefix = Lib/site-packages/PyQt5
Binaries = Lib/site-packages/PyQt5

In case it plays a role, i have also native Qt installed besides PyQt5. Are there some possible conflicts with the PyQt5 installation?

And besides everything, what did i wrong here? Does somebody of you have a tip for me how to solve this problem? Every help and hint is very welcome :)

Kind regards

Tiles

d_stranz
9th May 2016, 20:35
The qwindows.dll file needs to be in the platforms subdirectory under the executable, in this case probably Blender. See the article on Qt Deployment (http://doc.qt.io/qt-5/windows-deployment.html). If it is a 64-bit version of Python, then it needs the 64-bit version of the qwindows.dll file.

I don't know much about Blender. If it is a Python app, and the Python distro was built using MS Visual Studio 2013 (which is what the "1800" implies), then your qwindows.dll will likely need to be one that was built with that version of the compiler. If the "exe" is actually Python, then the dll probably needs to be installed under its exe path.

Tiles
10th May 2016, 08:06
Thanks for your answer d_stranz. You brought me at the right track :)

I had the qwindows.dll already besides the blender.exe before. But it needs to be in a subfolder called platforms to be found. So simple once you know it.

The panel is now showing, the crash is gone. Again thanks for your help :)