mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 21:38:13 +00:00
[macOS] Fix the issue with Python 2to3 symlink (#2326)
* change vm spec to Standard_D8s_v4 for win images * remove symlink to 2to3 * explicitly overwrite symlinks
This commit is contained in:
@@ -4,9 +4,6 @@ source ~/utils/utils.sh
|
|||||||
|
|
||||||
echo "Installing Python Tooling"
|
echo "Installing Python Tooling"
|
||||||
|
|
||||||
echo "Brew Installing Python 3"
|
|
||||||
brew install python@3.9
|
|
||||||
|
|
||||||
echo "Install latest Python 2"
|
echo "Install latest Python 2"
|
||||||
Python2Url="https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg"
|
Python2Url="https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg"
|
||||||
download_with_retries $Python2Url "/tmp" "python2.pkg"
|
download_with_retries $Python2Url "/tmp" "python2.pkg"
|
||||||
@@ -16,6 +13,11 @@ pip install --upgrade pip
|
|||||||
echo "Install Python2 certificates"
|
echo "Install Python2 certificates"
|
||||||
bash -c "/Applications/Python\ 2.7/Install\ Certificates.command"
|
bash -c "/Applications/Python\ 2.7/Install\ Certificates.command"
|
||||||
|
|
||||||
|
# Explicitly overwrite symlinks created by Python2 such as /usr/local/bin/2to3 since they conflict with symlinks from Python3
|
||||||
|
# https://github.com/actions/virtual-environments/issues/2322
|
||||||
|
echo "Brew Installing Python 3"
|
||||||
|
brew install python@3.9 || brew link --overwrite python@3.9
|
||||||
|
|
||||||
echo "Installing pipx"
|
echo "Installing pipx"
|
||||||
export PIPX_BIN_DIR=/usr/local/opt/pipx_bin
|
export PIPX_BIN_DIR=/usr/local/opt/pipx_bin
|
||||||
export PIPX_HOME=/usr/local/opt/pipx
|
export PIPX_HOME=/usr/local/opt/pipx
|
||||||
|
|||||||
Reference in New Issue
Block a user