Conda currently does not provide native builds of Python 3.7 for osx-arm64 due to various reasons, primarily because Python 3.8 had already been released when Apple Silicon hit the market, and since Python 3.7.12 was the final feature release and has entered the maintenance-only phase, it is unlikely that a native build for 3.7 will be provided.
Instead of waiting for a native build, you can emulate Python 3.7 on an Apple Silicon system using Rosetta or a container system like Docker.
To create osx-64 environments, you can follow these steps:
conda create -n py37
conda activate py37
conda config --env --set subdir osx-64
conda install python=3.7 numpy
Alternatively, you can use a YAML environment definition.
# Create an environment from YAML CONDA_SUBDIR=osx-64 conda env create -n py37 -f py37.yaml # Activate the environment conda activate py37 # Set the osx-64 architecture channel conda config --env --set subdir osx-64
While it is possible to request a native build of Python 3.7 for osx-arm64, it is unlikely to be approved since Python 3.8 is the recommended version and other package variants would need to be built for osx-arm64 as well.
The above is the detailed content of How Can I Install Python 3.7 on macOS with Apple Silicon?. For more information, please follow other related articles on the PHP Chinese website!