You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Splitting the version number into major and minor parts
8
+
IFS='.'read -r -a version_parts <<<"$python_version"
9
+
10
+
major_version="${version_parts[0]}"
11
+
minor_version="${version_parts[1]}"
12
+
13
+
if [ "$major_version"-eq 3 ] && [ "$minor_version"-ge 8 ];then
14
+
echo"Python version $python_version is greater than or equal to 3.8."
15
+
else
16
+
echo"Python version $python_version is less than 3.8."
17
+
flag=1
18
+
fi
19
+
else
20
+
echo"Python>=3.8 is not installed."
21
+
flag=1
22
+
fi
23
+
# # install python 3.8, i.e., using pyenv:
24
+
# pyenv install 3.8
25
+
if [ "$flag"-eq 1 ];then
26
+
command -v pyenv >/dev/null 2>&1&& pyenv local 3.8 && { echo>&2"Install python 3.8 using pyenv successfully.";} || { echo>&2"Pyenv is not installed. Did not install python 3.8 using pyenv. Please install mannually and retry";exit 1;}
0 commit comments