PyQt5 ImportError:DLL加载失败

时间:2019-10-06 12:08:10

标签: python-3.x dll pyqt5 importerror

我可能已经尝试了一切,但根本没有用。  这是我的代码:

import sys
from pprint import pprint
from PyQt5.QtWidgets import (QtWidgets, QPushButton, QLineEdit, QApplication)

class MyWindow(QWidget):
    def __init__(self):
        super().__init__()
        self.btn = QPushButton('Open', self)
        self.btn.move(0, 20)
        self.btn.clicked.connect(self.showDialog)

        self.text_name = QLineEdit(self)
        self.text_name.move(100,22)
        self.text_name.setPlaceholderText("Enter your name:")

        self.setGeometry(300, 300, 290, 140)
        self.setWindowTitle("Input dialog example")

    def showDialog(self):
        text, result = QInputDialog.getText(self, 'Input Dialog', 'Enter your name:')
        if result == True:
            self.text_name.setText(str(text))

if __name__ == '__main__':
    app = QApplication(sys.argv)
    pprint("input parameters = " + str(sys.argv))
    my_window = MyWindow()
    my_window.show()
    sys.exit(app.exec_())

这是错误:

error

我卸载并安装了Python 3.7,更新了pip,已经卸载和安装了PyQt5两次。我已经多次重启计算机,但仍然找不到灵魂。 随时问我可以帮助您解决问题的任何事情。

0 个答案:

没有答案