Merge pull request #1705 from akv-platform/al-cheb/set-default-python

[Ubuntu] Default Python will be switched to 3.8 on Ubuntu 20.04
This commit is contained in:
Maxim Lobanov
2020-10-01 09:41:59 +03:00
committed by GitHub
2 changed files with 7 additions and 8 deletions

View File

@@ -4,21 +4,20 @@
## Desc: Installs Python 2/3 ## Desc: Installs Python 2/3
################################################################################ ################################################################################
set -e
# Source the helpers for use with the script # Source the helpers for use with the script
source $HELPER_SCRIPTS/os.sh source $HELPER_SCRIPTS/os.sh
# Install Python, Python 3, pip, pip3 # 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 if isUbuntu16 || isUbuntu18; then
apt-get install -y --no-install-recommends python python-dev python-pip python3 python3-dev python3-pip apt-get install -y --no-install-recommends python python-dev python-pip python3 python3-dev python3-pip
fi fi
if isUbuntu20; then
apt-get install -y --no-install-recommends python3 python3-dev python3-pip
ln -s /usr/bin/pip3 /usr/bin/pip
fi
# Run tests to determine that the software installed as expected # Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work" echo "Testing to make sure that script performed as expected, and basic scenarios work"
for cmd in python pip python3 pip3; do for cmd in python pip python3 pip3; do

View File

@@ -96,7 +96,7 @@
"locales", "locales",
"openssh-client", "openssh-client",
"pkg-config", "pkg-config",
"python-is-python2", "python-is-python3",
"rpm", "rpm",
"texinfo", "texinfo",
"tk", "tk",