【问题标题】:Can I update to Python 3.9 or 3.10 in Anaconda base (root)?我可以在 Anaconda 基础(根)中更新到 Python 3.9 或 3.10 吗?
【发布时间】:2021-10-11 09:24:14
【问题描述】:

有没有办法将当前具有 Python 3.8.11 的当前 conda 基础(根)环境更新为 Python 3.9 或 3.10?我知道使用新的虚拟环境是推荐的方法,但我仍然想学习如何去做。

我尝试使用 conda install python=3.9conda install python = 3.10,这是几年前的一些帖子推荐的,但它们不起作用,我最终出现以下错误

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

另外,使用conda update python 只改变了微版本号(我认为它是从 Python 3.8.10 升级到 3.8.11)

【问题讨论】:

    标签: python python-3.x anaconda conda


    【解决方案1】:

    根据您的错误消息您无法将 conda base 升级到 python 3.10,因为这会导致不兼容。 (据说 numpy 包有一些问题。)所以你必须等待下一个 Anaconda 版本。

    然而,conda 的重点在于使用虚拟环境:

    conda create --name py10 python=3.10 
    

    这使您可以立即安装 Python 3.10。

    【讨论】:

    • 啊好吧,所以这基本上是创建一个虚拟环境吧?我看到了
    • @Techie5879,不完全是。它会创建一个conda environment,默认情况下它位于 conda envs 文件夹中。通常,据我了解,常见的虚拟环境可能位于项目文件夹中
    【解决方案2】:

    做事

    conda update python 你应该没问题。如果你特别想要3.10,你可以做conda update python="3.10"

    这将更新您当前的环境版本

    【讨论】:

      猜你喜欢
      • 2022-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-17
      • 2022-06-12
      • 2022-01-24
      • 1970-01-01
      • 2022-12-15
      相关资源
      最近更新 更多