从PyQt5导入QtCore时出错

时间:2016-06-29 13:58:36

标签: python pyqt5 qtcore

尝试导入QtCore

时出现此错误
from PyQt5 import QtCore

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/PyQt5/QtCore.so, 2): Symbol not found: _PyBytes_FromString
Referenced from: /usr/local/lib/python2.7/site-packages/PyQt5/QtCore.so
Expected in: flat namespace
     in /usr/local/lib/python2.7/site-packages/PyQt5/QtCore.so

1 个答案:

答案 0 :(得分:0)

您可以通过更新PyQt5 (instructions here, although they're currently temporarily offline)和pyqt_tools(可以使用pip来解决)来解决这个问题。