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
posted @   澄轶  阅读(3718)  评论(1编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
历史上的今天:
2017-12-13 bash shell执行方式
2016-12-13 spark 大数据 LR测试
2016-12-13 spark - tasks is bigger than spark.driver.maxResultSize
点击右上角即可分享
微信分享提示