From b2e372a086f067aecc012baf1143661ee73b9f69 Mon Sep 17 00:00:00 2001 From: Erika Hunhoff Date: Mon, 21 Oct 2024 11:27:00 -0600 Subject: [PATCH] Use specific python version (precedence 3.12, then 3.10) in `quick_setup.sh` (#1862) --- utils/quick_setup.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/utils/quick_setup.sh b/utils/quick_setup.sh index 0fcfddc026..7b1945939b 100755 --- a/utils/quick_setup.sh +++ b/utils/quick_setup.sh @@ -33,7 +33,13 @@ if [[ $WSL_DISTRO_NAME == "" ]]; then else echo "Environment is WSL" fi -if [! hash python3.10] || [! hash python3.12]; then +if hash python3.12; then + echo "Using python version `python3.12 --version`" + my_python=python3.12 +elif hash python3.10; then + echo "Using python version `python3.10 --version`" + my_python=python3.10 +else echo "This script requires python3.10 or python3.12" return 1 fi @@ -44,7 +50,7 @@ fi # if an install is already present, remove it to start from a clean slate rm -rf ironenv rm -rf my_install -python3 -m venv ironenv +$my_python -m venv ironenv source ironenv/bin/activate python3 -m pip install --upgrade pip VPP=`which xchesscc`