xxxxxxxxxx
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
xxxxxxxxxx
$ brew install --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
xxxxxxxxxx
# Step 1: Check if Homebrew is already installed
brew --version
# Step 2: Install Homebrew if it is not installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Step 3: Install Python using Homebrew
brew install python
# Step 4: Verify Python installation
python --version