版本:Python3.8
PyQt5 5.15.1
Anaconda已安装
查找文章按以下步骤:
pip3 install Sip
pip3 install PyQt5
pip install PyQt5-tools -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com
将pyqt5-tools添加到全局环境变量(Path)中,我的是:
C:\Users**\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\pyqt5_tools
测试代码
import sys
from PyQt5 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
widget = QtWidgets.QWidget(