Can't run PyQt application on 14.2
by usr345 from LinuxQuestions.org on (#5S4X8)
I compiled and installed PyQt from here: https://mirrors.slackware.com/slackw.../source/l/PyQt.
But when I try to run a simple application:
Code:import sys
from PyQt4 import QtCore, QtGui
from test_ui import Ui_Form
class MyForm(QtGui.QMainWindow):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_Form()
self.ui.setupUi(self)
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
myapp = MyForm()
myapp.show()
sys.exit(app.exec_())Code:$ python3 ./test1.pyIt gives an error: ModuleNotFoundError: No module named 'PyQt4'
Maybe, I need to change some configs?
But when I try to run a simple application:
Code:import sys
from PyQt4 import QtCore, QtGui
from test_ui import Ui_Form
class MyForm(QtGui.QMainWindow):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_Form()
self.ui.setupUi(self)
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
myapp = MyForm()
myapp.show()
sys.exit(app.exec_())Code:$ python3 ./test1.pyIt gives an error: ModuleNotFoundError: No module named 'PyQt4'
Maybe, I need to change some configs?