pi choose python3 as default code example
Example: change between two python 3 version in raspberrry pi
sudo update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.6 0
How it works
sudo update-alternative --install <link> <name> <path> <priority>
how to check what is the priority list ?
sudo update-alternatives --config python3