From adfddcf0ce0875df4512cd05a58cd1d5bc7e49d5 Mon Sep 17 00:00:00 2001 From: Nick Fox Date: Sun, 19 Nov 2017 22:06:36 -0500 Subject: Check python version and use python2 if python3 is default --- scripts/linux-setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/linux-setup.sh') diff --git a/scripts/linux-setup.sh b/scripts/linux-setup.sh index c0e3697f..c6e376ce 100755 --- a/scripts/linux-setup.sh +++ b/scripts/linux-setup.sh @@ -61,7 +61,12 @@ lastrun() pythonpath() { echo Configuring python path - ${SUDO}python ${BNPATH}/scripts/install_api.py $ROOT + if [[ $(python -V) == "Python 3."* ]] + then + ${SUDO}python2 ${BNPATH}/scripts/install_api.py $ROOT + else + ${SUDO}python ${BNPATH}/scripts/install_api.py $ROOT + fi } createdesktopfile() -- cgit v1.3.1