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() {
6060 fi
6161}
6262
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+
6371# EFFECTS: Returns true if the specified program is installed, false otherwise.
6472function check_if_installed() {
6573 if command -v " $* " > /dev/null 2>&1 ; then
@@ -99,6 +107,8 @@ function verify_installation() {
99107 echo ' You are now ready to use the Hologram Python SDK!'
100108}
101109
110+ check_python_version
111+
102112update_repository
103113
104114# Iterate over all programs to see if they are installed
115125 pause " Installing $program . Press [Enter] key to continue..." ;
116126 install_software ' python3-pip'
117127 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
118133 elif check_if_installed " $program " ; then
119134 echo " $program is already installed."
120135 else
You can’t perform that action at this time.
0 commit comments