[英]Jupyter Notebook: ModuleNotFoundError: No module named 'matplotlib.pylot'
I've just received the following error message from inside Jupyter Notebooks.我刚刚从 Jupyter Notebooks 内部收到以下错误消息。
*---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-e12bc46e5dd0> in <module>
----> 1 import matplotlib.pylot as plt
ModuleNotFoundError: No module named 'matplotlib.pylot'*
But FYI I've already installed matplotlib and I get the following message when I type "pip3 install matplotlib" into Terminal:但仅供参考,我已经安装了 matplotlib,当我在终端中键入“pip3 install matplotlib”时收到以下消息:
*Requirement already satisfied: matplotlib in /Users/mattbrown/miniconda3/lib/python3.7/site-packages (3.0.3)*
你只是拼错了 lib 名称,它是 pyplot,而不是 pylot ;)
Typo, use错别字,使用
import matplotlib.pyplot as plt
instead of代替
import matplotlib.pylot as plt
I'm so embarrassed!我好尴尬! That did the trick.这就是诀窍。 Fixed the typo and went with:修正了拼写错误并使用:
import matplotlib.pyplot as plt
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.