Install Python2 from pkg file (#2217)

This commit is contained in:
Mikhail Timofeev
2020-12-08 21:29:39 +03:00
committed by GitHub
parent d7b5e5afb7
commit 464fc5b500

View File

@@ -7,11 +7,14 @@ echo "Installing Python Tooling"
echo "Brew Installing Python 3" echo "Brew Installing Python 3"
brew install python@3.9 brew install python@3.9
echo "Brew Installing Python 2" echo "Install latest Python 2"
# Create local tap with formula due to python2 formula depreciation Python2Url="https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg"
brew tap-new --no-git local/python2 download_with_retries $Python2Url "/tmp" "python2.pkg"
FORMULA_PATH=$(brew extract python@2 local/python2 | grep "Homebrew/Library/Taps") sudo installer -pkg /tmp/python2.pkg -target /
brew install $FORMULA_PATH pip install --upgrade pip
echo "Install Python2 certificates"
bash -c "/Applications/Python\ 2.7/Install\ Certificates.command"
echo "Installing pipx" echo "Installing pipx"
export PIPX_BIN_DIR=/usr/local/opt/pipx_bin export PIPX_BIN_DIR=/usr/local/opt/pipx_bin