Thank you so much, that worked a treat.
For completeness, the snippet below is what I used, after installing Homebrew with the snippet from here
export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}"
eval "$(brew shellenv)"
git -C $(brew --repo homebrew/core) checkout master
brew install pyenv
pyenv install 2.7.18
ln -s "${HOME}/.pyenv/versions/2.7.18/bin/python2.7" "${HOMEBREW_PREFIX}/bin/python"