Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 428 Bytes

File metadata and controls

23 lines (14 loc) · 428 Bytes

How to change python version default in Ubuntu 20.04

  1. Check the installed versions of Python:
$ ls /usr/bin/python*

  1. Then, create the alternatives:
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2

  1. Then, choose the version you want:
$ sudo update-alternatives --config python