python – RuntimeError:sip模块实现API v11.0到v11.2,但PyQt5.QtCore模块需要API v11.3

python – RuntimeError:sip模块实现API v11.0到v11.2,但PyQt5.QtCore模块需要API v11.3,第1张

概述我最近在我的系统上安装了PyQt4并开始做一些基本任务(课程工作),它运行正常. 然后,几天后,我试图使用matplotlib. 当我尝试导入matplotlib.pyplot作为plt时,我收到以下错误: Traceback (most recent call last): File "C:\Users\user\Desktop\Confusion.py", line 1, in <modu 我最近在我的系统上安装了PyQt4并开始做一些基本任务(课程工作),它运行正常.

然后,几天后,我试图使用matplotlib.

当我尝试导入matplotlib.pyplot作为plt时,我收到以下错误:

Traceback (most recent call last):  file "C:\Users\user\Desktop\Confusion.py",line 1,in <module>    import matplotlib.pyplot as plt  file "C:\Program files\Anaconda3\lib\site-packages\matplotlib\pyplot.py",line 114,in <module>    _backend_mod,new_figure_manager,draw_if_interactive,_show = pylab_setup()  file "C:\Program files\Anaconda3\lib\site-packages\matplotlib\backends\__init__.py",line 32,in pylab_setup    globals(),locals(),[backend_name],0)  file "C:\Program files\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5agg.py",line 16,in <module>    from .backend_qt5 import QtCore  file "C:\Program files\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5.py",line 27,in <module>    import matplotlib.backends.qt_editor.figureoptions as figureoptions  file "C:\Program files\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\figureoptions.py",line 17,in <module>    import matplotlib.backends.qt_editor.formlayout as formlayout  file "C:\Program files\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\formlayout.py",line 58,in <module>    from matplotlib.backends.qt_compat import QtGui,QtWidgets,QtCore  file "C:\Program files\Anaconda3\lib\site-packages\matplotlib\backends\qt_compat.py",line 127,in <module>    from PyQt5 import QtCore,QtGui,QtWidgetsRuntimeError: the sip module implements API v11.0 to v11.2 but the PyQt5.QtCore module requires API v11.3[Finished in 1.9s]

我认为问题在于PyQt4的安装,而我已经有了PyQt5,但是this网站说他们可以在没有任何问题的情况下正常工作,前提是sip的版本相同.

这个问题似乎来自于啜饮.

我按照这里给出的步骤:PyQt5 – SIP API 10 level error. API 11 required

>当我运行import sip然后
print(sip,sip.SIP_VERSION_STR)

我得到以下内容:

4.16.9
>然后当我在命令提示符下运行sip -V时,我得到4.18.

我清楚地看到sip模块中有.

我想问的是,我该如何解决这个问题?

我使用的是Anaconda3的windows 8 64位系统

任何帮助表示赞赏. 总结

以上是内存溢出为你收集整理的python – RuntimeError:sip模块实现API v11.0到v11.2,但PyQt5.QtCore模块需要API v11.3全部内容,希望文章能够帮你解决python – RuntimeError:sip模块实现API v11.0到v11.2,但PyQt5.QtCore模块需要API v11.3所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1197737.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存