简体   繁体   中英

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.

Try installing using pip command

sudo apt-get install python3-pyqt4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM