python=2.7-not available from current channels

现象

  • 使用miniconda3创建python2的环境
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.

Collecting package metadata (repodata.json): done
Solving environment: failed

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

  - python=2.7

Current channels:

  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - 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.

原因定位

  • python 2 官方已经停止维护与更新。
  • 官方仓库中已没有python2相关包
  • conda默认channel检索不到python2.7导致

解决方案

  • 从anaconda2的配置中,查找到可用channel: https://repo.continuum.io/pkgs/free/osx-64
  • 指定channel url更新环境即可
conda create -c 'https://repo.continuum.io/pkgs/free/osx-64' -n py2 python=2.7

Original: https://www.cnblogs.com/suanec/p/15684862.html
Author: 苏轶然
Title: python=2.7-not available from current channels

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/10802/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

免费咨询
免费咨询
扫码关注
扫码关注
联系站长

站长Johngo!

大数据和算法重度研究者!

持续产出大数据、算法、LeetCode干货,以及业界好资源!

2022012703491714

微信来撩,免费咨询:xiaozhu_tec

分享本页
返回顶部