From c3c4935839751a3c37ba8dc995dbee725db05346 Mon Sep 17 00:00:00 2001 From: ranivrsv Date: Wed, 21 Jun 2023 14:47:59 -0700 Subject: [PATCH 1/2] Added check for python version --- setup_venv.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup_venv.sh b/setup_venv.sh index a564204886..9e03426126 100755 --- a/setup_venv.sh +++ b/setup_venv.sh @@ -27,6 +27,11 @@ PYTHON_VERSION_X_Y=`${PYTHON} -c 'import sys; version=sys.version_info[:2]; prin echo "Python: $PYTHON" echo "Python version: $PYTHON_VERSION_X_Y" +if [[ "$(python3 --version 2>&1)" != "Python 3.11"* ]]; then + echo "Error: Python version 3.11 is required." + exit 1 +fi + if [[ "$SKIP_VENV" != "1" ]]; then if [[ -z "${CONDA_PREFIX}" ]]; then # Not a conda env. So create a new VENV dir From 821fbb722404dc7ffee16b84c8c962c5ac868454 Mon Sep 17 00:00:00 2001 From: ranivrsv Date: Wed, 21 Jun 2023 17:21:47 -0700 Subject: [PATCH 2/2] Update for PYTHON_VERSION_X_Y --- setup_venv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_venv.sh b/setup_venv.sh index 9e03426126..6dbf25a4e0 100755 --- a/setup_venv.sh +++ b/setup_venv.sh @@ -27,7 +27,7 @@ PYTHON_VERSION_X_Y=`${PYTHON} -c 'import sys; version=sys.version_info[:2]; prin echo "Python: $PYTHON" echo "Python version: $PYTHON_VERSION_X_Y" -if [[ "$(python3 --version 2>&1)" != "Python 3.11"* ]]; then +if [ "$PYTHON_VERSION_X_Y" != "3.11" ]; then echo "Error: Python version 3.11 is required." exit 1 fi