Skip to content

Instantly share code, notes, and snippets.

@banjin
Forked from ptantiku/setup-python3.8-via-ppa.sh
Created November 12, 2021 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banjin/bfc5132ecac53f6888e1bc3f38ab9716 to your computer and use it in GitHub Desktop.
Save banjin/bfc5132ecac53f6888e1bc3f38ab9716 to your computer and use it in GitHub Desktop.
Setup Python3.8 in Ubuntu Xenial (16.04 LTS). The python version was fixed at Python 3.5.1
#!/bin/sh
# install PPA
sudo add-apt-repository ppa:deadsnakes/ppa
# update and install
sudo apt update
sudo apt install python3.8 python3.8-dev python3.8-venv
# setup alternatives
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
# show menu for selecting the version
sudo update-alternatives --config python3
# or one command to set it
# sudo update-alternatives --set python3 /usr/bin/python3.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment