The app failed to start because there is no Qt platform to initialize

problem description: This application failed to start because no Qt platform plugin could be initialized.


I installed the python environment and PyQt5 library


solution:

CMD command line input PIP list to view the installed python library

1, first uninstall PyQt5, enter PIP uninstall PyQt5 to uninstall

2. Find the installation location of PyQt5 after uninstalling, and directly delete the folder

3. Delete environment variables

win10: this computer — > Property – & gt; Advanced system Setup — & GT; Advanced – & gt; Environmental variable — & GT; The system variable
removes the variable named QT_QPA_PLATFORM_PLUGIN_PATH
4. Delete and reinstall PyQt5

command PIP install PyQt5
(download slow if the command line, you can go to the website https://pypi.org/project/PyQt5/#files links from thunderbolt download, download after install, remember not to the right version, don’t know which version download can on the command line input PIP install PyQt5 enter, displays are behind the download version, I download file is the following version
)

5. Configure environment variables after installation, and restart the computer after configuration.

variable name: QT_QPA_PLATFORM_PLUGIN_PATH
variable value: C:(PyQt5 installation path)\Python\ python38-32 \Lib\site-packages\PyQt5\Qt\plugins

Read More: