Last active
June 20, 2020 10:03
-
-
Save kentblake/6910dd256f989abb41af30a8eeb01237 to your computer and use it in GitHub Desktop.
Update alternatives syntax for changing from python2.7 to python3.7
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 update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did more RTFM and discovered that I was indeed able to change default python, just not using the syntax that I was guessing at.
This entire gist is from reading in the "Debian Administrator's handbook:"
https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux
So I am taking the || pseudo-code out because both commands are necessary. Also please note that the versions are as of this date and you may need to change them as python3 versions will increment. If you are on python2.7, we already know there will be no further development on that platform other than patches or security updates, so the only time you would need to modify will be for python3 revisions, etc.
Now for what I learned:
`
Fantastic!