I have found a solution that worked for me. This solution includes a code snippet to add before you import any modules from Pyside2 or PyQt5 package. See "Qt platform plugin "windows" #2" for more information.
If the Pycharm console or debugger are showing "Could not find or load the Qt platform plugin windows", the Python EXE file may be located at a different location for the PyCharm interpreter. You might manually select it in File -> Settings -> Interpreter.
Inspired by Osama Adly, I think this kind of problems are all caused by Anaconda configuration for Qt DLLs on Windows platform.Just try to install PyQt/PySide in an empty environment besides Anaconda, for example a standalone Python program. You will find that the plugins about platforms are in the site-package directory itself.For comparation:
All of this did not work.In my case, the solution was to update Windows.The computer was apparently running a very outdated version of Windows (10?)After 2-3 hours of installing the update, problem solved.Source/Inspiration: -disk/no-qt-platform-plugin-could-be-initialized.html
For those who are still stuck after trying every other option out there in the internet, you can look into exact path from which this notorious libqxcb.so is being searched in, for opening/loading by the Qt App(VirtualBox-5.2.8 is the Qt app in my case), using the strace tool. In my case, since I was building VirtualBox-5.2.8 from its source, it was searching for libqxcb.so in the below location :"...VirtualBox-5.2.8/out/linux.amd64/release/bin/platforms/"and not in the default library paths, Qt installation path, etc. So, none of the ldd checks, and other solutions worked. And also setting QT_DEBUG_PLUGINS=1 didn't produce any extra logs either.
That was my hitting-the-nail-on-its-head moment, and I created the symlink from the installed Qt5.10.1's platforms directory mentioned below :"...Qt5.10.1/Tools/QtCreator/lib/Qt/plugins/platforms/" onto the searched path which is "...VirtualBox-5.2.8/out/linux.amd64/release/bin/". Thus, VirtualBox-5.2.8 built from source on Linux(Ubuntu 17.10 x86_64) using Clang/LLVM, finally launched successfully!
read closely, in case: QLibraryPrivate::loadPlugin failed on "/foo../venv/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /foo../venv/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)"
After analyzing extensive user reports, we summarize the 6 applicable ways to fix the Qt platform plugin Windows error. You can try them in order until the error gets solved or choose the ones that work best for you.
I use both Win7 and Win8.1 on 2 different machines. This morning I upadated the MiKTeX packages in admin. Since, I have trouble compiling documents that used to be compilable as late as yesterday.On Win8.1, the error message states: "This application failed to start because it could not find or load Qt platform plugin"windows". The recommandation message that follows is: reinstalling the application may fix the problem. Which application is unclear.
Yesterday, I have updated to TeXstudio 2.11.2 on Win7 and I have received an error saying that 'Qt platform plugin was not found/loaded' while attempting to run the application. I believe this is a MikTex associated error, therefore I decided to replay here.
I have been trying to tackle this same issue all day. I followed your steps completely as described above. I was able to locate the "qwindows.dll" and copy it to the Bin folder, however this did not solve the issue. I have tried uninstalling and re-downloading a fresh application and restarted of course.........but no luck. getting frustrated. I don't know what I am doing wrong. Anybody else have the same issues even after following the suggested steps above???
I have problem with the tutorial turtlesim.I use ROS2 dashing with windows.I have install qt 5.13.2 and qt 5.12.6 (for make sure that qt is not tge problem) and visual studio 2015 and also have configured the PATH.but the problem always come like below.
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "C:\Qt\Qt5.13.2\5.13.2\msvc2015_64\plugins\platforms"This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: direct2d (from C:\Qt\Qt5.13.2\5.13.2\msvc2015_64\plugins\platforms), minimal (from C:\Qt\Qt5.13.2\5.13.2\msvc2015_64\plugins\platforms), offscreen (from C:\Qt\Qt5.13.2\5.13.2\msvc2015_64\plugins\platforms), windows (from C:\Qt\Qt5.13.2\5.13.2\msvc2015_64\plugins\platforms).
setting it to C:\Program Files\RStudio\bin\plugins did fix the problem, though I worry it might create problems for other programs, particularly if I ever uninstall RStudio having forgotten all about this.
whenever i try to launch any of my origin games i get this error "this application failed to start because it could not find or load the qt platform plugin "windows" in "". available platform plugins are: windows minimal. reinstalling the application may fix this problem" Ive reinstalled origin so many times now and the games still wont launch and i'm not sure what the hell im meant to do now, as far i know no other parts of pc are affected and origin still opens fine but when i try to launch one my games i get the error, i attached an image of the error window
I tried everything I could, uninstalling manually then reinstalling, downloading windows again, erasing all the games I have in origin, I have used my two whole days trying to fix this problem but it didn't seem to fix. After cleaning up my windows, I downloaded origin right away but it still didn't work, when I installed other launchers like epic games, it worked. Please fix it.
The Windows deployment tool windeployqt is designed to automate the process of creating a deployable folder containing the Qt-related dependencies (libraries, QML imports, plugins, and translations) required to run the application from that folder. It creates an installation tree for Windows desktop applications, which can be easily bundled into an installation package.
We have two challenges when deploying the Plug & Paint application using the shared libraries approach: The Qt runtime has to be correctly redistributed along with the application executable, and the plugins have to be installed in the correct location on the target system so that the application can find them.
To deploy the application, we must make sure that we copy the relevant Qt DLLs (corresponding to the Qt modules used in the application) and the Windows platform plugin, qwindows.dll, as well as the executable to the same directory tree in the release subdirectory.
In contrast to user plugins, Qt plugins must be put into subdirectories matching the plugin type. The correct location for the platform plugin is a subdirectory named platforms. Qt Plugins section has additional information about plugins and how Qt searches for them.
We'll cover the plugins shortly, but first we'll check that the application will work in a deployed environment: Either copy the executable and the Qt DLLs to a machine that doesn't have Qt or any Qt applications installed, or if you want to test on the build machine, ensure that the machine doesn't have Qt in its environment.
All Qt GUI applications require a plugin that implements the Qt Platform Abstraction (QPA) layer in Qt. For Windows, the name of the platform plugin is qwindows.dll. This file must be located within a specific subdirectory (by default, platforms) under your distribution directory. Alternatively, it is possible to adjust the search path Qt uses to find its plugins, as described below.
Your application may also depend on one or more Qt plugins, such as the print support plugin, the JPEG image format plugin or a SQL driver plugin. Be sure to distribute any Qt plugins that you need with your application. Similar to the platform plugin, each type of plugin must be located within a specific subdirectory (such as printsupport, imageformats or sqldrivers) within your distribution directory.
As of Qt 5.14, the libraries are relocatable unless Qt was built with the configure switch -relocatable turned off. The search paths for Qt plugins are relative to the location of the QtCore library and no further steps are required to ensure plugins are found after installing the application on the target machine.
In this case, the search path for Qt plugins is hard-coded into the QtCore library. By default, the plugins subdirectory of the Qt installation is the first plugin search path. However, pre-determined paths like the default one have certain disadvantages. For example, they may not exist on the target machine. For that reason, you need to examine various alternatives to make sure that the Qt plugins are found: