Python is a powerful programming language. It is very friendly and easy to learn. At writing time of this article Python 3.4.4 latest stable version is available to download and install. This article will help you to install Python 3.4.4 on your CentOS, Red Hat & Fedora operating systems.
Install Required Packages
Use the following command to install prerequisites for Python before installing it.
# yum install gcc
Download Python 3.4.4
Download Python using following command from python official site. You can also download latest version in place of specified below.
# cd /usr/src # wget https://www.python.org/ftp/python/3.4.4/Python-3.4.4.tgz
Now extract the downloaded package.
# tar xzf Python-3.4.4.tgz
Compile Python Source
Use below set of commands to compile python source code on your system using altinstall.
# cd Python-3.4.4 # ./configure # make altinstall
Now remove downloaded source archive file from your system
# rm Python-3.4.4.tgz
Check Python Version
Check the latest version installed of python using below command
python3.4 -VPython 3.4.4