导入matplotlib.pyplot时,为什么会收到“ ModuleNotFoundError:没有名为matplotlib.mathtext的模块”?

时间:2019-12-01 10:55:09

标签: python matplotlib

我正在做一个使用matplotlib的简单项目。我什至没有在程序中调用它,但是在尝试运行该程序时出现错误。我正在做import matplotlib.pyplot as plt。我很确定已经安装了软件包。

完整错误如下:

Traceback (most recent call last):
  File "parse.py", line 13, in <module>
    import matplotlib.pyplot as plt
  File "/Users/sethmarks/miniconda3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 32, in <module>
    import matplotlib.colorbar
  File "/Users/sethmarks/miniconda3/lib/python3.6/site-packages/matplotlib/colorbar.py", line 32, in <module>
    import matplotlib.contour as contour
  File "/Users/sethmarks/miniconda3/lib/python3.6/site-packages/matplotlib/contour.py", line 19, in <module>
    import matplotlib.text as text
  File "/Users/sethmarks/miniconda3/lib/python3.6/site-packages/matplotlib/text.py", line 18, in <module>
    from .textpath import TextPath  # Unused, but imported by others.
  File "/Users/sethmarks/miniconda3/lib/python3.6/site-packages/matplotlib/textpath.py", line 12, in <module>
    from matplotlib.mathtext import MathTextParser
ModuleNotFoundError: No module named 'matplotlib.mathtext'

我需要做些什么来纠正这个问题?

0 个答案:

没有答案