I've just received the following error message from inside 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:
*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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.