首页 > 解决方案 > 当 conda python 版本在任何频道中都不可用时,如何更新它?

问题描述

我想将我的 conda 环境更新为 python3.7.7。然而

conda install python=3.7.7

结果是

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

  - python=3.7.7

Current channels:

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

我在本地安装了正确的版本:

$ /usr/local/bin/python3 --version
Python 3.7.7

那么我怎样才能让 conda 使用它呢?

标签: pythonanaconda

解决方案


鉴于 python 3.7.7 于 3 月 10 日(6 天前)发布,我认为这只是它尚未打包到 conda 包中的问题。通常在发布和经过 conda 打包和测试之间存在延迟。如果您愿意并且有时间,您可以帮助为https://conda-forge.org/做出贡献 nb:通常包会更早到达 conda-forge(尽管 3.7.7 还没有),如果就是这样,您可以将 conda forge 添加到您的频道列表

$ conda install python=3.7.7 -c conda-forge

编辑:要查看可用的软件包,您可以使用

$ conda search python

或者

$ conda search python -c conda-forge

推荐阅读