Python 3.10 is the newest Python release and it has some great new features that will make Python development easier and faster than ever before! In this post, we will show you how to set Python 3.10 to be your default Python version.
In our previous post, we showed how to install Python 3.10 from the source and this post will show how to set any Python version that is installed on the machine to be the default. In our case, we will set 3.10 to be the default.
Set Default Version
To set the default version, I will use the following command to set the default version. The only thing that needs to change in the code below is the Python version (python3.10)
sudo update-alternatives --install /usr/bin/python python /usr/local/bin/python3.10 1