I've got a problem in Pycharm while running the following code:
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QVBoxLayout
from PyQt5.QtCore import QTimer, QTime, Qt
class DigitalClock(QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
pass
if __name__ == '__main__':
app = QApplication(sys.argv)
clock = DigitalClock()
clock.show()
sys.exit(app.exec_())
When I run it, the terminal gives me the following error message:
Traceback (most recent call last):
File "C:\Users\nnils\PycharmProjects\DigitalClock\main.py", line 2, in <module>
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QVBoxLayout
ImportError: DLL load failed while importing QtWidgets: Die angegebene Prozedur wurde nicht gefunden.
Process finished with exit code 1
What can I do to fix this problem?
I already tried to uninstall PyQt5 and reinstall it but the error stayed. Also I've tried to completely reinstall Pycharm and my Python interpreter. Plus changing the interpreter to an earlier version did not help either.