Skip to content

Commit 015f2be

Browse files
committed
check python and pip versions (#19)
1 parent 055607b commit 015f2be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ function install_software() {
6161
}
6262

6363
function check_python_version() {
64-
if ! python3 -V | grep '3.[7-9].[0-9]' > /dev/null 2>&1; then
64+
python3 -V | grep '3.[7-9].[0-9]' &> /dev/null
65+
if ! [ $? == 0 ]; then
6566
echo "An unsupported version of python 3 is installed. Must have python 3.7+ installed to use the Hologram SDK"
6667
exit 1
6768
fi
@@ -124,7 +125,8 @@ do
124125
pause "Installing $program. Press [Enter] key to continue...";
125126
install_software 'python3-pip'
126127
fi
127-
if ! pip3 -V | grep '3.[7-9]' >/dev/null 2>&1; then
128+
pip3 -V | grep '3.[7-9]' &> /dev/null
129+
if ! [ $? == 0 ]; then
128130
echo "pip3 is installed for an unsupported version of python."
129131
exit 1
130132
fi

0 commit comments

Comments
 (0)