I am trying to run a python program in eric and I am getting an error -
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on david-SATELLITE-C50-B, Standard
>>> Exception "unhandled ImportError"
No module named 'PyQt4'
File: /home/david/pyqt/firsttry.py, Line: 2
The program is a simple first try as follows
import sys
from PyQt4 import QtGui
def window():
app = QtGui.QApplication(sys.argv)
w = QtGui.QWidget()
b = QtGui.QLabel(w)
b.setText("Hello World!")
w.setGeometry(100,100,200,50)
b.move(50,20)
w.show()
sys.exit(app.exec_())
if __name__ == '__main__':
window()
Has anyone any idea how to fix this. Have I installed pyqt4 in the wrong place for instance
pyqt4
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: pyqt4
Of course, you've installed PyQt4, yes?eegrek39 wrote: ⤴Sat Feb 24, 2018 4:18 amCode: Select all
No module named 'PyQt4' from PyQt4 import QtGui
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.