Python 3 install pyqt5

version: Python3.8
PyQt5 5.15.1
Anaconda has been installed
finds the article by following the steps:
pip3 install Sip
pip3 install PyQt5
pip install PyQt5-tools -i –

adds pyqt5-tools to the global environment variable (Path). Mine is:
C:\Users**\AppData\Local\Programs\Python\ python38-32 \Lib\site-packages\pyqt5_tools

test code

import sys
from PyQt5 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
widget = QtWidgets.QWidget()
widget.resize(360, 360)
widget.setWindowTitle("hello, pyqt5")

: this application failed to start because no Qt platform plugincould be initialized may fix thisproblem

reinstalled PyQt5 also not

C:\Users**\AppData\Local\Programs\Python\ python38-32 \Lib\site-packages\PyQt5\Qt\plugins

and then restart the computer, to take effect, appear successful problem solving

reference articles: depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.channel_param

Read More: