Step 1 – Prerequisites
Use the following command to install prerequisites for Python before installing it.
Step 2 – Download Python 3.5
Download Python using following command from python official site. You can also download latest version in place of specified below. Now extract the downloaded package.
Compile Python Source
Use below set of commands to compile python source code on your system using altinstall. make altinstall is used to prevent replacing the default python binary file /usr/bin/python. Now remove downloaded source archive file from your system
Check Python Version
Check the latest version installed of python using below command