Answers for "set default python version windows"

2

change default python version

sudo update-alternatives --config python
Posted by: Guest on December-20-2020
0

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
Posted by: Guest on November-03-2021

Code answers related to "set default python version windows"

Python Answers by Framework

Browse Popular Code Answers by Language