Step 1 – Prerequsitis
As you are going to install Python 3.8 from the source. You need to install some development libraries to compile Python source code. Use the following command to install prerequisites for Python:
Step 2 – Download Python 3.8
Download Python source code using the following command from python official site. You can also download the latest version in place of specified below.
Then extract the downloaded source archive file
Step 3 – Compile Python Source
Use below set of commands to compile Python source code on your system using altinstall.
Step 4 – Check Python Version
Check the installed version of python using the following command. As you have not overwritten the default Python version on the system, So you have to use Python 3.8 as follows:
After successful installation remove the downloaded archive to save disk space