How to install Python 3.7 via homebrew on OS X

homebrewinstallpython

I need to rollback my homebrew-managed python 3.8 to 3.7.

I have tried the approach from Homebrew: Rollback from Python 3.7 to Python 3.6.5.x? – Ask Different. So I unlinked 3.8, but my python.rb URL for 3.7 seems to be wrong. I used:

brew install --ignore-dependencies https://github.com/Homebrew/homebrew-core/blob/eb6d8719c1880dd7c5d03a49c45ab40509fc2927/Formula/python.rb

and with this I get the following error:

"Calling Non-checksummed download of python formula file from an arbitrary URL is disabled."

What is the correct command to install Python 3.7 via homebrew?

Best Answer

The easiest way to install python 3.7 is from Homebrew using the following command: brew install python@3.7