笔记本中的 matplotlib 错误:没有名为“matplotlib”的模块

时间:2021-05-15 07:17:05

标签: python matplotlib jupyter-notebook

当我在我的 jupyter 笔记本中导入 matplotlib 时,它不起作用,这是它的错误:

enter image description here

谁能帮我看看我的代码有什么问题?

2 个答案:

答案 0 :(得分:0)

你甚至安装了lib吗? 你可以安装它 python -m pip install -U matplotlib

答案 1 :(得分:0)

enter image description here在您的 Anaconda Prompt 终端上尝试以下操作:

  1. pip -V <- 将显示 pip 的版本,如果它已成功安装到您的系统上。然后我们会尝试升级它。
  2. pip install --upgrade pip <- 执行此操作以升级您的 pip,如果它已经升级,则会显示它。
  3. pip install matplotlib <- 然后写这个命令,如果仍然不起作用,请在评论中告诉我