[PyQt] Cannot import name QtGui
Phil Thompson
phil at riverbankcomputing.com
Sat May 17 16:18:20 BST 2008
On Saturday 17 May 2008 15:05:07 Wade Spires wrote:
> Hi,
>
> I am new to pyqt development. I am trying to just run some of the
> example programs but am getting this import error:
> PyQt-x11-gpl-4.4 # ./examples/tutorial/t1.py
> Traceback (most recent call last):
> File "./examples/tutorial/t1.py", line 6, in ?
> from PyQt4 import QtGui
> ImportError: cannot import name QtGui
>
> It looks like PyQt is installed:
> PyQt-x11-gpl-4.4 # ls /usr/lib64/python2.4/site-packages/PyQt4/
> elementtree/ QtAssistant.so* QtGui.so* Qt.so* QtTest.so*
> __init__.py QtCore.so* QtNetwork.so* QtSql.so* QtXml.so*
> pyqtconfig.py QtDesigner.so* QtOpenGL.so* QtSvg.so* uic/
>
> I tried setting my PYTHONPATH and LD_LIBRARY_PATH environment
> variables to include /usr/lib64/python2.4/site-packages and
> /usr/lib64/python2.4/site-packages/PyQt4/ respectively, but this did
> not solve the problem. I can import PyQt4 itself, but it doesn't seem
> to have any modules available such as QtGui or QtCore.
>
> Any idea on what the problem is and how to solve it? I apologize if
> such a simple problem has already been answered, but I didn't see it
> in the archive.
Permissions on the .so files?
Phil
More information about the PyQt
mailing list