How to install python 3.7 on macbook M1 ?

➜ brew install python@3.7
python@3.7: The x86_64 architecture is required for this software.
Error: An unsatisfied requirement failed this build.

I have Rosetta2, Can I use brew x86 to install python 3.7 ?

Answer is YES, start from install brew x86 version aka ibrew

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
alias ibrew="arch -x86_64 /usr/local/bin/brew"
ibrew install python@3.7

References

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store