python=2.7-not available from current channels [How to Solve]

phenomenon

Creating a python 2 environment using minicanda3

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.

Cause location

Python 2 official has stopped maintenance and updating.

There are no python2 related packages in the official warehouse

CONDA default channel failed to retrieve python2 7 lead

 

Solution:

From the configuration of anaconda2, find the available channels: https://repo.continuum.io/pkgs/free/osx-64

Specify the channel URL to update the environment

conda create -c 'https://repo.continuum.io/pkgs/free/osx-64' -n py2 python=2.7

Similar Posts: