1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#!/bin/bash
set -xe
version=$1
brew install python@$1
echo /opt/homebrew/opt/python@$version/libexec/bin >> $GITHUB_PATH
ls -l /opt/homebrew/opt/python@$version/libexec/bin
# Looks like python3 is not a symlink to python in 3.11
if [[ ! -f /opt/homebrew/opt/python@$version/libexec/bin/python3 ]]
then
ln -s /opt/homebrew/opt/python@$version/libexec/bin/python /opt/homebrew/opt/python@$version/libexec/bin/python3
fi
if [[ ! -f /opt/homebrew/opt/python@$version/libexec/bin/pip3 ]]
then
ln -s /opt/homebrew/opt/python@$version/libexec/bin/pip /opt/homebrew/opt/python@$version/libexec/bin/pip3
fi
ls -l
|