简体   繁体   English

Jupyter Notebook:ModuleNotFoundError:没有名为“matplotlib.pylot”的模块

[英]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.

相关问题 没有名为“matplotlib.pylot”的模块 - No module named 'matplotlib.pylot' Python 错误:即使已安装,也没有名为“matplotlib.pylot”的模块 - Python error: No module named 'matplotlib.pylot' even though it is installed jupyter ModuleNotFoundError:没有名为 matplotlib 的模块 - jupyter ModuleNotFoundError: No module named matplotlib Jupyter Notebook ModuleNotFoundError-&gt;没有名为&#39;sql&#39;的模块 - Jupyter Notebook ModuleNotFoundError --> No module named 'sql' ModuleNotFoundError:Jupyter Notebook 上没有名为“_tkinter”的模块 - ModuleNotFoundError: No module named '_tkinter' on Jupyter Notebook ModuleNotFoundError:在jupyter笔记本python中没有名为“可视化”的模块 - ModuleNotFoundError: No module named 'visualization' in jupyter notebook python Jupyter 笔记本:ModuleNotFoundError:没有名为“scipy”的模块 - Jupyter notebook: ModuleNotFoundError: No module named 'scipy' (Jupyter Notebook) ModuleNotFoundError: No module named 'pandas' - (Jupyter Notebook) ModuleNotFoundError: No module named 'pandas' ModuleNotFoundError:没有名为“pandas”的模块(jupyter notebook) - ModuleNotFoundError: No module named 'pandas' (jupyter notebook) ModuleNotFoundError:Jupyter Notebook 中没有名为“tensorflow”的模块 - ModuleNotFoundError: No module named 'tensorflow' In Jupyter Notebook
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM