changing default python version ubuntu
sudo update-alternatives --set python /usr/bin/python3.6
changing default python version ubuntu
sudo update-alternatives --set python /usr/bin/python3.6
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 default python version linux
update-alternatives --list python
# update-alternatives: error: no alternatives for python
# means not set yet
update-alternatives --install /usr/bin/python python /usr/bin/python3 1
# update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
# update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode
update-alternatives --install /usr/bin/python python /usr/bin/python3.9 3
# update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode
# Higher last param will be auto selected
update-alternatives --list python
# shows all
python --version
# Python 3.9 or whichever highest
update-alternatives --config python
# This will let you change vers from a menu
set python 3 as default ubuntu
update-alternatives: error: no alternatives for python3
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us