diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 51e10d4858..d8ec2f8d73 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -36,6 +36,7 @@ MYDIR="$(dirname "$(realpath "$0")")" function check_install_python() { # Need the trap here to make sure the return value of grep being 1 doesn't cause set -e to fail # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap + rm -f /usr/local/bin/2to3-3.11 trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then brew install "python@${OS_PYTHON_VERSION}"