【问题标题】:matplotlib error in notebook :No module named 'matplotlib' [duplicate]笔记本中的matplotlib错误:没有名为“matplotlib”的模块[重复]
【发布时间】:2021-08-05 05:04:49
【问题描述】:

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

enter image description here

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

【问题讨论】:

  • 你的python环境中没有安装matplotlib
  • @Scratch'N'Purr thanx 你能解释一下我现在应该做什么吗?

标签: python matplotlib jupyter-notebook


【解决方案1】:

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

  1. pip -V
  2. pip install --upgrade pip
  3. pip install matplotlib

【讨论】:

  • 在第2部分我有这个错误找不到满足matplotlib要求的版本
  • pip install --upgrade pip
  • 此问题与某些代理有关,您的防火墙不允许 pip 连接到 Internet,因此您需要允许来自 windows 防火墙的 pip 才能正常工作。我在某处看到这个,您需要使用以下代理:HTTPS_PROXY=username:password@proxy.example.com:8080" https_proxy=username:password@proxy.example.com:8080" 您可能需要找到必须设置这些代理变量的位置。
  • 是的,它与代理 .thanx 有关
【解决方案2】:

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

【讨论】:

  • 我试试这个,但我现在有这个问题,版本号错误
猜你喜欢
  • 2017-05-30
  • 2016-07-19
  • 2021-02-17
  • 1970-01-01
  • 2023-03-07
  • 2018-07-11
  • 2015-12-22
相关资源
最近更新 更多