File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ function install_software() {
60
60
fi
61
61
}
62
62
63
+ function check_python_version() {
64
+ python3 -V | grep ' 3.[7-9].[0-9]' & > /dev/null
65
+ if ! [ $? == 0 ]; then
66
+ echo " An unsupported version of python 3 is installed. Must have python 3.7+ installed to use the Hologram SDK"
67
+ exit 1
68
+ fi
69
+ }
70
+
63
71
# EFFECTS: Returns true if the specified program is installed, false otherwise.
64
72
function check_if_installed() {
65
73
if command -v " $* " > /dev/null 2>&1 ; then
@@ -99,6 +107,8 @@ function verify_installation() {
99
107
echo ' You are now ready to use the Hologram Python SDK!'
100
108
}
101
109
110
+ check_python_version
111
+
102
112
update_repository
103
113
104
114
# Iterate over all programs to see if they are installed
115
125
pause " Installing $program . Press [Enter] key to continue..." ;
116
126
install_software ' python3-pip'
117
127
fi
128
+ pip3 -V | grep ' 3.[7-9]' & > /dev/null
129
+ if ! [ $? == 0 ]; then
130
+ echo " pip3 is installed for an unsupported version of python."
131
+ exit 1
132
+ fi
118
133
elif check_if_installed " $program " ; then
119
134
echo " $program is already installed."
120
135
else
You can’t perform that action at this time.
0 commit comments