python=2.7-not available from current channels
阿新 • • 發佈:2021-12-13
現象
- 使用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
蘇軼然: suanec -
http://www.cnblogs.com/suanec/
友鏈:
聲援博主:如果您覺得文章對您有幫助,可以點選文章右下角【推薦】一下。您的鼓勵是博主的最大動力!
點個關注吧~