File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,18 @@ function error_exit {
2424
2525
2626# Check Python version > 3.7
27- PYTHON_VERSION=$( python3 -c ' import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))' )
28- REQUIRED_VERSION=3.7
29- if (( $(echo "$PYTHON_VERSION < $REQUIRED_VERSION " | bc - l) )) ; then
30- echo " Python 3.7 or higher is required. Found $PYTHON_VERSION ."
27+ major=$( python3 -c ' import sys; print(sys.version_info.major)' )
28+ minor=$( python3 -c ' import sys; print(sys.version_info.minor)' )
29+
30+ if (( major < 3 || (major == 3 && minor < 7 ) )) ; then
31+ echo " Python 3.7 or higher is required. Found $major .$minor ."
3132 echo " Stopping python environment setup."
3233 return
3334else
34- echo " Python version is OK: $PYTHON_VERSION "
35+ echo " Python version is OK: $major . $minor "
3536fi
3637
38+
3739# Save current directory to return later
3840curdir=$( pwd)
3941
You can’t perform that action at this time.
0 commit comments