如何通过Anaconda提示符升级Conda版本?

3

我正在使用conda安装一些包,系统提示:

==> WARNING: A newer version of conda exists. <==
  current version: 4.7.10
  latest version: 4.10.1

Please update conda by running

    $ conda update -n base -c defaults conda

我的问题是,如何升级到特定版本而不是最新版本,例如conda版本4.9.2?

3个回答

8
非常简单!只需使用以下命令,但不要包含 "<< >>" 符号:
conda update conda
conda install anaconda=<<VersionNumber>>

希望这可以解决您的问题。更多信息请参阅Anaconda文档


2
我遇到了相同的问题,只不过在我的情况下它显示为“最新版本:22.11.1”。从4到22的版本号是否增加得如此迅速?还是这是我的环境出了问题? - undefined
4
@qqqqq conda切换到了日历版本控制,4.15之后是22,就像2022年一样。 - undefined

2
conda update -n base -c defaults conda
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.10.3
  latest version: 23.3.1

Please update conda by running

    $ conda update -n base -c defaults conda



# All requested packages already installed.

(base) andrew@debianbuster:~$ conda update conda
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.10.3
  latest version: 23.3.1

Please update conda by running

    $ conda update -n base -c defaults conda



# All requested packages already installed.

(base) andrew@debianbuster:~$ conda install anaconda=23.3.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - anaconda=23.3.1

Current channels:

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

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

我也遇到了同样的问题,但这似乎更像是个“我也是”而不是一个答案。 - undefined
有人有运气解决这个问题吗? - undefined

0
我之前也遇到了同样的错误,以下是解决方法
conda install conda=XX.X.X

或者如之前所提到的,如果是Anaconda,那就是你想要的确切版本。希望能成功。

2
你的回答可以通过提供更多支持性信息来改进。请编辑以添加进一步的细节,例如引用或文档,以便他人能够确认你的回答是否正确。你可以在帮助中心找到关于如何撰写好回答的更多信息。 - undefined

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接