Search code examples
pythonpython-3.xubuntupyqt4

Problems importing QtGui from PyQt4


I have installed PyQt4 for python3 on Ubuntu 16.04LTS using these instructions: https://gist.github.com/0x414A/8b64178e69d9f8331938

I experience no problems importing PyQt4 but when I try to import QtGui from PyQt4, I receive the following error:

>>> from PyQt4 import QtGui Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: /home/yorka/Documents/BasicGUI/venv/lib/python3.5/site-packages/PyQt4/QtCore.so: undefined symbol: PyString_Type

Any help is greatly appreciated.


Solution

  • Try installing using pip command

    sudo apt-get install python3-pyqt4