From 18daec78c862a0055467f6c74c62a504f0ed7fa4 Mon Sep 17 00:00:00 2001 From: Ranvir Singh Virk <49649026+Ranvirsv@users.noreply.github.com> Date: Wed, 21 Jun 2023 18:56:47 -0700 Subject: [PATCH] Added check for python version (#1570) * Added check for python version * Update for PYTHON_VERSION_X_Y --- setup_venv.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup_venv.sh b/setup_venv.sh index a564204886..6dbf25a4e0 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 [ "$PYTHON_VERSION_X_Y" != "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