Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
543 views
in Technique[技术] by (71.8m points)

python - 导入matplotlib.pyplot时,为什么会出现`ModuleNotFoundError:没有名为matplotlib.mathtext的模块?(Why am I getting a `ModuleNotFoundError: No module named matplotlib.mathtext' when import matplotlib.pyplot?)

I am doing a simple project where I am using matplotlib.

(我正在做一个使用matplotlib的简单项目。)

I am not even calling it in the program, but am getting an error when trying to run the program.

(我什至没有在程序中调用它,但是在尝试运行该程序时出现错误。)

I am doing import matplotlib.pyplot as plt .I am pretty sure the package is installed.

(我正在import matplotlib.pyplot as plt 。我很确定已经安装了软件包。)

The full error looks like:

(完整错误如下所示:)

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'

What do I need to do to correct this?

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

  ask by Seth Marks translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...