简体   繁体   English

从PyQt4导入QtGui时出现问题

[英]Problems importing QtGui from PyQt4

I have installed PyQt4 for python3 on Ubuntu 16.04LTS using these instructions: https://gist.github.com/0x414A/8b64178e69d9f8331938 我已经使用以下说明在Ubuntu 16.04LTS上为python3安装了PyQt4: 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: 我没有遇到导入PyQt4的问题,但是当我尝试从PyQt4导入QtGui时,出现以下错误:

>>> 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 尝试使用pip命令安装

sudo apt-get install python3-pyqt4 须藤apt-get install python3-pyqt4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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