Quick guide to update Python version in CentOS 5.x/6.x

Quick guide to update Python version (from 2.4.x to 2.7.6) in CentOS.

1- Get the dependencies (if necessary)

yum install gcc zlib-devel python-setuptools readline-devel

Note: The build-in python version is 2.4 in CentOS 5/6.

2 – Prepare, Create the python resource directory

Found and get the python version: 2.7.6

mkdir /usr/src/python2.7.6

wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz

tar xvzf <python_version>

compile the source code

./configure
make altinstall
3- Test new python version
python2.7

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s