Unable to set default python version to python3 in ubuntu

The second line mentioned can be changed to

[sudo] update-alternatives --install /usr/bin/python python /usr/bin/python3 10

This gives a priority of 10 for the path of python3.

The disadvantage of alternatively editing .bashrc is that using the commands with sudo will not work.

Leave a Comment