Created
August 9, 2020 10:41
-
-
Save amoretspero/ac0af3db81609f9939c971a43c52e496 to your computer and use it in GitHub Desktop.
Upgrade python version on ubuntu (>= 18.04)
This file contains hidden or 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
# 0. Get official distribution. Substitue 'x' with desired version. | |
sudo apt-get install python3.x | |
# 1. Get all installed python3 distributions | |
ls -alh /usr/bin | grep python3 | |
# 2. Add installed python3 version to update-alternatives | |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.x | |
# 3. Configure update-alternatives. | |
sudo update-alternatives --config python3 | |
# 4. If using virtualenv, update its python version | |
python3 -m virtualenv -p python3.x <your_virtualenv_name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment