File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,20 @@ function check_prerequisites() {
100100 exit 1
101101 fi
102102
103+ # Check Python version
104+ if command -v python3 & > /dev/null; then
105+ local python_version=$( python3 -c ' import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")' )
106+ local min_python_version=" 3.12"
107+ if [[ $( echo -e " $min_python_version \n$python_version " | sort -V | head -n1) != $min_python_version ]]; then
108+ echo " Error: Python version >= $min_python_version is required. (Installed version is $python_version )" >&2
109+ echo " Please upgrade your Python installation." >&2
110+ exit 1
111+ fi
112+ else
113+ echo " Error: Python 3 is not installed or not in PATH" >&2
114+ exit 1
115+ fi
116+
103117 # Set platform-specific commands
104118 if [[ $( uname -m) == " x86_64" ]]; then
105119 USE_CONTAINER_FLAG=" "
You can’t perform that action at this time.
0 commit comments