Saturday, November 9, 2013

Upgrading Python at Linux without YUM

Upgrading the Python at Linux box is slightly risky as the Yum is heavily dependent upon the Python. You have to be very careful while doing this on linux.

I was having the Python 2.4.3 as default with my linux installation. To upgrade the Python to 2.7.3 I have followed the below instructions. It was simple. Just downloading, compiling and installing.

Notes: Make sure you have the linux development tools, gcc, zlib and similar things are already installed. Otherwise you can not perform the following tasks.

1) Download the Python.

2) Extract the zip file.
tar xf Python-2.7.3.tar.bz2

3) Enter inside the extracted directory.
cd Python-2.7.3

4) Configuring the installation.
./configure --prefix=/usr/local

5) Make and install at the same time.
make && make altinstall

6) Add symbolic link in /usr/local/bin.
ln -s /usr/local/bin/python2.7 /usr/local/bin/python

That's it. Enjoy your upgraded Python!

No comments:

Get function name programaticaly - Python

This little piece of code will help you to get the function name programatically. This is very helpful when you are implementing the debug...