Skip to content

Instantly share code, notes, and snippets.

@tiagocardosos
Last active June 21, 2022 11:09
Show Gist options
  • Save tiagocardosos/5f0d2a5edaccb2f719baacf134cd790e to your computer and use it in GitHub Desktop.
Save tiagocardosos/5f0d2a5edaccb2f719baacf134cd790e to your computer and use it in GitHub Desktop.
How to Install Python 3.6.* in Ubuntu 16.04 LTS - Docker
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6 libpython3.6
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 2
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo rm /usr/bin/python3
sudo ln -s python3.6 /usr/bin/python3
#ref
#http://ubuntuhandbook.org/index.php/2017/07/install-python-3-6-1-in-ubuntu-16-04-lts/
@Keped
Copy link

Keped commented Dec 6, 2018

Cool!
Did it work for you without adding -y to apt-get installs?

@caseybrichardson
Copy link

In a dockerfile you don't require the sudo calls and I also required -y in front of the install packages. Make sure to also run apt-get update before the first line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment