【问题标题】:How do I install Matplotlib 3.4.1 in Anaconda?如何在 Anaconda 中安装 Matplotlib 3.4.1?
【发布时间】:2021-06-30 02:27:31
【问题描述】:

我想使用仅在版本 3.4.1 中可用的包。当我执行 conda list 时,我看到我的 matplotlib 版本是 3.2.2。

我尝试过conda.install matplotlib=3.4.1,但在这些渠道中返回PackagesNotFound Error

Current channels:

  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch

我尝试conda install --channel "conda-forge" matplotlib 来解决这个问题,但没有运气。它说所有软件包都已安装。我不明白为什么这不起作用,因为网页 https://anaconda.org/conda-forge/matplotlib 表明该软件包是 v3.4.1

编辑: 我试过conda update matplotlib 将我的更新到 3.3.4 但不是 3.4.1... 查看此文档后:https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html# 我尝试使用pip install matplotlib,但它只是指定了一堆Requirement already specified: (...) 语句而没有升级到安装

任何帮助表示赞赏。

【问题讨论】:

  • 您是否尝试过使用pip
  • 是的,刚刚编辑的帖子

标签: python matplotlib installation anaconda package


【解决方案1】:

我尝试使用 DavidD003 解决方案 https://stackoverflow.com/a/66932922/11753330 它也适用于 conda 命令: conda install -c conda-forge matplotlib==3.4.2

这样更新成功了。 之前:

matplotlib                3.3.4            py38hecd8cb5_0  
matplotlib-base           3.3.4            py38h8b3ea08_0

之后:

matplotlib                3.4.2            py38h50d1736_0    conda-forge
matplotlib-base           3.4.2            py38h6152e83_0    conda-forge

【讨论】:

    【解决方案2】:

    我去Matplotlib官网discourse发现了这个帖子:https://discourse.matplotlib.org/t/matplotlib-announce-ann-matplotlib-3-4-1/21991

    使用pip install matplotlib==3.4.1 有效!最初我尝试过pip install matplotlib=3.4.1,但只使用一个“=”是错误的。

    【讨论】:

    • 我仍然收到 '''pip install matplotlib==3.4.1 --user''' '''错误:没有找到 matplotlib==3.4.1''' 的匹配分布跨度>
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-05
    • 2015-05-17
    • 2016-09-05
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    • 2019-04-24
    相关资源
    最近更新 更多