[英]ImportError: PyQt4 is not installed
I try to use the py_entitymatching
framework to find duplicates in this dataset . 我尝试使用
py_entitymatching
框架在此数据集中查找重复项。
To label the data it uses PyQt4. 要标记数据,它使用PyQt4。 So when I try to execute the labeling command I get an error
因此,当我尝试执行标签命令时,出现错误
Though as you can see PyQt4 is installed on my machine and I can import it. 虽然您可以看到PyQt4已安装在我的计算机上,但我可以将其导入。
Any ideas on how to fix it? 关于如何解决它的任何想法?
Thanks 谢谢
Update: 更新:
When I try to import QtGui I get the following error: 当我尝试导入QtGui时,出现以下错误:
>>> from PyQt4 import QtGui
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /home/oliver/anaconda3/lib/python3.5/site-packages/PyQt4/QtCore.so: undefined symbol: __cxa_throw_bad_array_new_length
All the packages mentioned below have been installed 下面提到的所有软件包均已安装
Any other thoughts? 还有其他想法吗?
It looks like your PyQt package is not installed, even if the first line says that your package is installed. 即使第一行显示您的软件包已安装,您的PyQt软件包仍未安装。
Try to install it with pip and see if it does make a change 尝试使用pip安装它,看看它是否有变化
If you are using python2
如果您使用的是
python2
sudo pip install SIP
sudo pip install PyQt
If you are using python3
如果您使用的是
python3
sudo apt-get install python3-pyqt4
Update 更新
from PyQt4 import QtGui Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: /home/oliver/anaconda3/lib/python3.5/site-packages/PyQt4/QtCore.so: undefined symbol: __cxa_throw_bad_array_new_length
Looking at your error, it seems your compilation did go wrong. 查看您的错误,看来您的编译确实出错了。
One possible solution would be to deinstall python
, reinstall it and install PyQt
again through pip
一种可能的解决方案是卸载
python
,重新安装它,然后通过pip
重新安装PyQt
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.