matplotlib 中缺少绘图属性

Plot attribute missing from matplotlib

我正在使用 pip install matplotlib 在 juypter hub 实例上安装 matplotlib。

当我导入时出现以下错误:

----> 4 import matplotlib.plot as plt 5 import seaborn as sns

ModuleNotFoundError: No module named 'matplotlib.plot'

我在这里找不到任何东西。我曾尝试通过命令行在 Linux 上从 git 手动安装,但这似乎也没有用。任何帮助都会很棒。

谢谢。

正确的命令是import matplotlib.pyplot。如果一切都正确安装,它应该可以工作。