PyQt4 and Python 3.2 on OS X -
i've installed qt4.7.3, python 3.2, sip, & pyqt4. or think do? can import pyqt4
without issues when try run this:
#!/usr/bin/env python3
import sys
pyqt4 import qtgui
app = qtgui.qapplication(sys.argv)
widget = qtgui.qwidget()
widget.resize(250, 150)
widget.setwindowtitle('simple')
widget.show()
sys.exit(app.exec_())
i error:
traceback (most recent call last):
file "./simple.py", line 6, in <module>
pyqt4 import qtgui
importerror: cannot import name qtgui
i've checked paths , seem fine when looking components can't find them? have libqt.a , libqtcore.a assume components be. can't seem access them.
any ideas?
thanks.
if use #!/usr/bin/env python3 can not sure version of python starts up. testing should directly use python3.2!
since import pyqt4 works , from pyqt4 import qtgui not, files in pyqt4 module directory misplaced.
the qtgui.so file needs resist directly in pyqt4 directory!
on gnu systems directory can found @ /usr/lib/python3/dist-packages/pyqt4/ , on windows @ %systemdrive%23/python32/lib/site-packages/pyqt4/.
this might finding directory on mac os:
import pyqt4 print(pyqt4.__file__)
Comments
Post a Comment