Skip to content

Commit

Permalink
check python and pip versions (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
DomAmato committed Mar 25, 2020
1 parent 055607b commit 015f2be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ function install_software() {
}

function check_python_version() {
if ! python3 -V | grep '3.[7-9].[0-9]' > /dev/null 2>&1; then
python3 -V | grep '3.[7-9].[0-9]' &> /dev/null
if ! [ $? == 0 ]; then
echo "An unsupported version of python 3 is installed. Must have python 3.7+ installed to use the Hologram SDK"
exit 1
fi
Expand Down Expand Up @@ -124,7 +125,8 @@ do
pause "Installing $program. Press [Enter] key to continue...";
install_software 'python3-pip'
fi
if ! pip3 -V | grep '3.[7-9]' >/dev/null 2>&1; then
pip3 -V | grep '3.[7-9]' &> /dev/null
if ! [ $? == 0 ]; then
echo "pip3 is installed for an unsupported version of python."
exit 1
fi
Expand Down

0 comments on commit 015f2be

Please sign in to comment.