From ec921a2443fde29a19b83d2c264a4e3a2b7eac7d Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Wed, 30 Sep 2020 16:19:28 +0300 Subject: [PATCH] set python3 as default on Ubuntu 20.04 --- images/linux/scripts/installers/python.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/images/linux/scripts/installers/python.sh b/images/linux/scripts/installers/python.sh index 3f6361e16..2cc9c464d 100644 --- a/images/linux/scripts/installers/python.sh +++ b/images/linux/scripts/installers/python.sh @@ -4,21 +4,20 @@ ## Desc: Installs Python 2/3 ################################################################################ +set -e # Source the helpers for use with the script source $HELPER_SCRIPTS/os.sh # Install Python, Python 3, pip, pip3 -if isUbuntu20 ; then - apt-get install -y --no-install-recommends python3 python3-dev python3-pip - - curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py - python2 get-pip.py -fi - if isUbuntu16 || isUbuntu18 ; then apt-get install -y --no-install-recommends python python-dev python-pip python3 python3-dev python3-pip fi +if isUbuntu20 ; then + apt-get install -y --no-install-recommends python3 python3-dev python3-pip python-is-python3 + ln -s /usr/bin/pip3 /usr/bin/pip +fi + # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" for cmd in python pip python3 pip3; do