ubuntu15.06安装PyQt5(python2.7)出错


安装步骤参考 http://blog.csdn.net/tao_627/article/details/46499545


最后一步:
运行python helloworld.py出错:
Traceback (most recent call last):
  File "helloworld.py", line 5, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets  
RuntimeError: the sip module implements API v11.0 to v11.1 but the PyQt5.QtCore module requires API v11.3


在命令行输入:
$ python
>>>import sip
>>>print(sip, sip.SIP_VERSION_STR)
(<module 'sip' from '/usr/lib/python2.7/dist-packages/sip.x86_64-linux-gnu.so'>, '4.16.6')


解决办法:
删除/usr/lib/python2.7/dist-packages/sip.x86_64-linux-gnu.so

猜你喜欢

转载自blog.csdn.net/nikoong/article/details/52541828