Answer the question
In order to leave comments, you need to log in
How to overcome the qt.qpa.plugin error when running a script with PyQt5?
Always installed pyqt with pip install pyqt5. Everything worked.
Today I did everything as usual, and when I run scripts containing PyQt, I get the following.
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
import sys
from PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
w = QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Simple')
w.show()
sys.exit(app.exec_())
Answer the question
In order to leave comments, you need to log in
There may be a conflict between the versions of the Python interpreter and PyQt5.
You can try to solve it by reinstalling pip install PyQt5==<версия> --force-reinstall
and substitute the latest working version of PyQt5 instead of the version.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question