Answers for "how to make python 3 default on linux"

1

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)
Posted by: Guest on February-17-2021
3

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
Posted by: Guest on December-20-2020
2

update link python is python 3

$ python --version
Python 2.7.6
$ python3 --version
Python 3.4.3
$ alias python=python3
$ python --version
Python 3.4.3
Posted by: Guest on July-28-2020
0

set python 3 as default ubuntu

update-alternatives: error: no alternatives for python3
Posted by: Guest on December-20-2020
0

update link python is python 3

$ unalias python
$ python --version
Python 2.7.6
Posted by: Guest on July-28-2020

Code answers related to "how to make python 3 default on linux"

Python Answers by Framework

Browse Popular Code Answers by Language