尝试使用pyQt5(python 3.6),但面对ModuleNotFoundError

时间:2018-04-11 02:13:22

标签: windows python-3.x pyqt5

import sys
from PyQt5 import QtWidgets


def main():
    app = QtWidgets.QApplication([])
    window = QtWidgets.QMainWindow()
    label = QtWidgets.QLabel('\tHello World!')
    window.setCentralWidget(label)
    window.show()
    app.exec_()


if __name__ == '__main__':
    main()

尝试通过cmd“pip install pyqt5”和“pip install pyqt5-tools”安装pyqt5后执行

此处附有显示错误的图片

0 个答案:

没有答案