Based on the update-alternatives command. This method is a system-level modification.
Just execute the following two commands directly:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
If you need to change back to the python2 default, enter:
sudo update-alternatives --config python
or
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 150
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 100
complete.