Python 2.7 在osx-arm64平台发布之前就被淘汰了,所以没有任何这样的构建,且大多数 Python 包也将缺少Python 2.7 的osx-arm64构建。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
conda create -n python27 python=2.7


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.

解决方法

通过 Rosetta 模拟。Apple 提供了一个 x86_64 模拟器Rosetta 2,它将运行 x86_64 二进制文件。

1
CONDA_SUBDIR=osx-64 conda create -n py27 python=2.7

参考链接

Anaconda channel for installing python 2.7