importosimportsysfromPyQt5.QtWidgetsimportQApplication,QLabel# 设置 QT_QPA_PLATFORM_PLUGIN_PATH 环境变量defset_qt_plugin_path():ifsys.platform=='win32':os.environ['QT_QPA_PLATFORM_PLUGIN_PATH']='C:\\Path\\To\\Qt\\plugins\\platforms'elifsys.platform=='linux':os.environ['QT_QPA_PLATFORM_...
在搜索Win 10中输入sysdm.cpl 高级->环境变量->到系统变量->添加:路径C:\User\~\ AppData \AppData\->\ Python 36-32\ Lib \ site-packages \ pyqt5_tools \ plugins \->\(您的地址为qminimal.dll,qoffscreen.dll,qwebgl.dll) 从这里获取的dll:https://www.riverbankcomputing.com/software/pyqt/do...