This application failed to start because it could not find or load the Qt platform plugin 'windows'. Available platform plugins are: minimal, offscreen, windows. Reinstalling the application may fix this problem. OK - I tried to put qwindows.dll from Qt installation, but it still doesn't work. Qt platform plugin 'windows'. Available platform plugins are: minimal, offscreen, windows. Reinstalling the application may fix this problem.
Active2 months ago
This question already has an answer here:
Sep 28, 2019 Windows 10: Finding & loading the Qt platform plugin 'windows' in '. Discus and support Finding & loading the Qt platform plugin 'windows' in '. In Windows 10 Installation and Upgrade to solve the problem; ATTACH The attached message keeps popping up on my screen, I don't know which application supposedly didn't start. Is the message legitimate.
Nvidia windows 10 32 bit. I read a lot of questions and answers related to this issue. However, none of them solved my problem.
I would like to point out that i am using the 5.12.2 of Qt. In addition, i tried to generate .exe files using windeployqt command (Calling it via the cmd).
So, i have two different qt application (2 .exe files). I transfer them in a different windows machine with no Qt installation. One .exe file is running correctly however the other one gives me back the error related to the qt platform plugin 'Windows'.
I would like also to point out, that the running exe is produced using Qt 5.12.2 (MinGW 7.3.0 64-bit). For the problematic exe, the 5.12.2 (MinGW 7.3.0 32-bit) is used.
Do you know what will be the problem?
PS. i double check that the qwindows.dll is in the platforms folder. I also tried to put this dll in the same folder as the exe file as well as in a sub-folder called plugins (based on some answers find around the web.)
Thanks a lot,
Elena ValariElena Valari
marked as duplicate by eyllanesc qtJul 11 at 2:34
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
2 Answers
Are these exe files in the same folder ? If so you need to put the in 2 different folders as they will not use the same DLLs (including
qwindows.dll ). One exe needs 32-bit DLLs and the other one 64-bit DLLs.
If they are already in 2 seperate folders, make sure you have run the correct
windeployqt on each of them.
You need to use the
windployqt.exe from your 'Qt 5.12.2 (MinGW 7.3.0 64-bit)' installation on the 64-bit exe. And use the windployqt.exe from your 'Qt 5.12.2 (MinGW 7.3.0 32-bit)' installation on the 32-bit exe.
Also be sure to copy the Qt5Core.dll using windeployqt and not by doing a manual copy/paste. The reason is that windeployqt patches Qt5Core.dll when copying it so that it searches plugins relatively to your exe.
Benjamin TBenjamin T
I encountered this issue with PyQt5 5.11.3, Windows 10, Python 3.7.3; I got a similar error message:
qt.qpa.plugin: Could not find the Qt platform plugin 'windows' in ' This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I set the following environment variable and then run the application. This Method had solved my question, I hope it is helpful for you:
Hasitha M Jayawardana
1,77422 gold badges1010 silver badges2626 bronze badges
starstar
Not the answer you're looking for? Browse other questions tagged qtexe or ask your own question.
Active8 months ago
I am implementing qgis 3.4.3 in a custom application, but when I instantiate the QgsApplication() class, I receive the error 'Could not find the Qt platform plugin 'Windows' in '.
I've attempted using various installs of qgis 3.x+ including the standalone installer and OSGeo4W web installer. I currently am sticking with the OSGeo4W web installer installation. I am using a Python 3.7 installation separate from what comes with OSGeo4W and attempting to integrate qgis functionality.
I have followed the instructions in the following QGIS help doc under the section: 'Using PyQGIS in Custom Applications'https://docs.qgis.org/2.18/en/docs/pyqgis_developer_cookbook/intro.html#run-python-code-when-qgis-starts
After attempting to run the script I realized a dll plugin was missing. After some research, I found its the qwindows.dll that qt uses. The qwindows.dll is included in the OSGeo4W installation under: C:OSGeo4WappsQt5pluginsplatforms
I changed the QT_PLUGIN_PATH variable on the local command prompt to include the directory above, but the same error prevailed. I also changed the QT_DEBUG_PLUGINS variable to 1 which printed out the locations Qt is looking for plugins. Interestingly, it wasn't looking for plugins in the path I specified in the QT_PLUGIN_PATH variable.
Python Code: Transcend elite software download.
Batch File Code to Start Cmd Prompt with Proper Variables: 3 bureau free credit report.
I expect to run the python script and receive no errors since I'm pointing to the directory where the qwindows.dll missing plugin is stored. However, I am still receiving the missing windows plugin error.
Here is the actual message with QT_DEBUG_PLUGINS set to 1:QFactoryLoader::QFactoryLoader() checking directory path 'C:/OSGeo4W/apps/qgis/qtplugins/platforms' ..QFactoryLoader::QFactoryLoader() checking directory path 'C:/OSGeo4W/apps/Python37/platforms' ..qt.qpa.plugin: Could not find the Qt platform plugin 'windows' in 'This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Matt BrauerMatt Brauer
Reinstall Qt Platform Plugin Windows 101 Answer
Add the following environment variables at the beginning of your python script before loading qgis.core:
What Is The Qt Platform Plugin Windows Vista
The QT_QPA_PLATFORM_PLUGIN_PATH variable is used by Qt to look up certain drivers including the qwindows.dll. It doesn't know the path to the '~qgis directoryappsQt5plugins' directory, so you need to provide it before using the QgsApplication module imported from qgis.core.
In order for your local version of python to find the qgis.core directory, you will also need to add the following qgis directories to your script before loading qgis.core:
Matt BrauerMatt Brauer
Qt Platform Plugin Windows VistaNot the answer you're looking for? Browse other questions tagged pythonpyqgispyqt or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |