Skip to content

Commit

Permalink
Minor typo + Update install_requirements.sh to support python 3.10 >= (
Browse files Browse the repository at this point in the history
…#1368)

* Update install_requirements.sh to support python 3.10 >= , <3.13

* Update install_requirements.sh

* Update install_requirements.sh
  • Loading branch information
Jack-Khuu authored Nov 13, 2024
1 parent 6eae887 commit 2cf1a17
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions install/install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ then
if [[ -z ${CONDA_DEFAULT_ENV:-} ]] || [[ ${CONDA_DEFAULT_ENV:-} == "base" ]] || [[ ! -x "$(command -v python)" ]];
then
PYTHON_EXECUTABLE=python3
else
PYTHON_EXECUTABLE=python
fi
fi
echo "Using python executable: $PYTHON_EXECUTABLE"

PYTHON_SYS_VERSION="$($PYTHON_EXECUTABLE -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")"
# Check python version. Expect 3.10.x or 3.11.x
# Check python version. Expect at least 3.10.x
if ! $PYTHON_EXECUTABLE -c "
import sys
if sys.version_info < (3, 10) or sys.version_info >= (3, 12):
if sys.version_info < (3, 10):
sys.exit(1)
";
then
echo "Python version must be 3.10.x or 3.11.x. Detected version: $PYTHON_SYS_VERSION"
echo "Python version must be at least 3.10.x. Detected version: $PYTHON_SYS_VERSION"
exit 1
fi

Expand Down

0 comments on commit 2cf1a17

Please sign in to comment.