PyQt5 - Failed to load platform plugin "windows". Available platforms are: windows, minimal

Ondrej Vencovsky picture Ondrej Vencovsky · Jul 17, 2013 · Viewed 19.8k times · Source

When I try to run any PyQt5 program from Eclipse, I got this error.

Failed to load platform plugin "windows". Available platforms are: windows, minimal

I've never encountered this problem with PyQt4 but with the new version.

I'm not able to run a program. From other questions here I know it happens with Qt C++ development and the solution is to copy some Qt dll files to executable program directory.

Do I need to do the same in Python development (PyQt5) too? Add those files to the directory, where my *.py files reside? Shouldn't this be managed by PyQt5 installation?

Thank you

Answer

Arun M picture Arun M · Aug 12, 2013

I encountered this issue with PyQt5 5.0.2, Windows 8, Python 3.3.2; slightly different error message:

Failed to load platform plugin "windows". Available platforms are:

Set the following environment variable and then run the application.

$env:QT_QPA_PLATFORM_PLUGIN_PATH="C:\Python33\Lib\site-packages\PyQt5\plugins\platforms"