Last active
June 21, 2022 11:09
-
-
Save tiagocardosos/5f0d2a5edaccb2f719baacf134cd790e to your computer and use it in GitHub Desktop.
How to Install Python 3.6.* in Ubuntu 16.04 LTS - Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.