Shell/Bash: linux set python 3 as default Example

By

Shell/Bash Example: This is the "linux set python 3 as default" Example. compiled from many sources on the internet by SimpleTutorials.org

linux set python 3 as default

1. Check current version:
$ python --version
2. get root permissions:
$ sudo su
3. set python3 as default:
$ update-alternatives --install /usr/bin/python python /usr/bin/python3 1
4. Done. (Check by $ python --version)

set python 3 as default ubuntu

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.4 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2

set python 3 as default ubuntu

update-alternatives: error: no alternatives for python3 



* Summary: This "linux set python 3 as default" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others