在梁斌老师的九_03_模拟掷骰子_3.0_课程中,写完代码后运行会出现以下问题?请问怎么解决?

D:\Anaconda3\python.exe D:/pycharm/pycharm项目/lect08/lect08_v3.0.py
Traceback (most recent call last):
  File "D:/pycharm/pycharm项目/lect08/lect08_v3.0.py", line 10, in <module>
    import matplotlib.pyplot as plt
  File "D:\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "D:\Anaconda3\lib\site-packages\matplotlib\backends\__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "D:\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 16, in <module>
    from .backend_qt5 import QtCore
  File "D:\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5.py", line 26, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "D:\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\figureoptions.py", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "D:\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\formlayout.py", line 56, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "D:\Anaconda3\lib\site-packages\matplotlib\backends\qt_compat.py", line 137, in <module>
    from PyQt4 import QtCore, QtGui
ModuleNotFoundError: No module named 'PyQt4'

Process finished with exit code 1

要回复问题请先登录注册