#Set Default Version of Python
#If you have more than one version of Python installed on your CentOS 8, you may need to set the default version of Python.
#Configuring the default version helps applications and programs that require a python command to navigate to the appropriate location.
#Set Python 3 or Python 2 as the system-wide python command.
#To assign Python 3 as the default version, use the command:
alternatives --set python /usr/bin/python3
#You can also set Python 2 as the unversioned python command:
alternatives --set python /usr/bin/python2
#You can also remove the unversioned command with:
alternatives --auto
#Uninstall Python on CentOS 8
#Use DNF to uninstall any Python version.
#To remove Python 3, run the command:
dnf remove python3
#The command uninstalls Python 3 and removes related dependencies.
#Confirm you want to remove the listed packages by typing y and hit Enter.
#remove Python 3 from CentOS 8
#If you want to remove Python 2, use:
dnf remove python2
#Again, verify you want to remove the package with y and Enter.
#remove Python 2 from CentOS 8, Conclusion:
#This step-by-step tutorial shows you how simple it is to install Python 3 and Python 2 on CentOS 8.
#It also includes instructions for setting the default Python version, as well as steps for removing Python from the system. Next, you can install Pip, a package manager for the Python.