How to upgrade python 2.6 to 2.7 on CentOS-6

pythonToday, I think to upgrade my python version 2.6 to 2.7 on CentOS-6 because of some application requirement so I tried to search on Google How to upgrade python 2.6 to 2.7 on CentOS-6 but I haven’t found any easy way like RPM or YUM. The below is a step by step procedure for how to upgrade to Python 2.7 on CentOS 6.5.

I have to install Develop Tools, it is a required dependency to install Python.

~]$sudo yum -y groupinstall ‘Development Tools’python-0-0~]$sudo yum -y install openssl-devel* ncurses-devel* zlib*.x86_64

python-0-1~]$sudo yum -y install bzip2 bzip2-devel bzip2-libs

python-0-2Next download the latest tar/gzip/tgz available here:
http://python.org/ftp/python/2.7/

~]$ mkdir Download
~]$ cd Download

python-1#Download the latest available at this time
Download]$ wget http://python.org/ftp/python/2.7/Python-2.7.tgz

python-3#Unzip/expand file
Download]$ tar xfz Python-2.7.tgzpython-4#Change Directory to the unzipped folder
Download]$cd Python-2.7

python-5#read README file or you can follow the lines below
Python-2.7]$./configure

python-6#you could also run configure with threads and shared enabled
#./configure –prefix=/opt/python2.7 –with-threads –enable-shared
#Compile
Python-2.7]$make

python-8python-9#Install the python 2.7
Python-2.7]$make install

python-10python-11

# Exit from your shell and open a new shell/SSH session
# Use the command below to display which path of python is currently active
Python-2.7]$which python

#To verify if the install succeeded
Python-2.7]$python -Vpython-12#Use UPPERCASE ‘V’ – not lower-case.
#Output will be “Python 2.7”
#Exit your current shell prompt and reopen if you are not able to view this output
#a new before checking the version.

You have successfully upgrade your python version 2.6 to 2.7 on centos.
Enjoy 🙂

Tagged , , , , , . Bookmark the permalink.

9 Responses to How to upgrade python 2.6 to 2.7 on CentOS-6

  1. Pingback: cialis prices

  2. Pingback: buy viagra online no prescription

  3. Pingback: chloroquine virus

  4. Pingback: hydroxychloroquine 2020

  5. Pingback: viagra without a doctor prescription connect

  6. Pingback: cialis warnings

  7. Pingback: buy real viagra online without prescription

  8. Pingback: careprost bimatoprost 3ml

  9. Pingback: cheap cialis