I could install 2.7.18 on M1.
brew install pyenv
pyenv install 2.7.18
Set the python version.
pyenv global 2.7.18
Export PATH if necessary.
export PATH="$(pyenv root)/shims:${PATH}"
Add if necessary.:
echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.zshrc