- Check the installed versions of Python:
$ ls /usr/bin/python*
- 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
- Then, choose the version you want:
$ sudo update-alternatives --config python