Setup of Development environment for Python 2.7 on Centos/Redhat 6

My references are for this post:::::::

How to install Python 2.7 and Python 3.3 on CentOS 6

Since the usual python version on Centos is up to 2.6 and django 1.6.0 etc. you may need an upgraded version or the latest version of Python 2.7.X, for your development on latest code base. This post is for such people in need of this and the instructions are as follows::
1)  First install the following through Yum:::

–   yum groupinstall “Development tools”
–   yum install zlibdevel bzip2devel openssldevel ncursesdevel sqlitedevel readlinedevel tkdevel gdbmdevel db4devel libpcapdevel xzdevel  httpd-devel

2)  Modify your under /etc to include another line, here it is the second line::::

Then issue command ldconfig a couple of times for it to take effect. I had to do it twice for some reason. so you may need to as well.

3)   Download Python the latest code base into /tmp in your machine::::::

wget it::::::tar xvf    Python–XXXX.xz

4)  Then change the to the Python-XXX   directory and type in :::::

./configure   prefix=/usr/local enableunicode=ucs4 enableshared

5)  After configuration of the compile code is completed, type in the following to make and “””ALTINSTALL”””””    it so that you only install it into the /usr/local/lib directory. Be sure to altinstall:::::

make  altinstall

6)  Download and install setup tools under /tmp:::

7)  Now install PIP tool:::
easy_install2.7       pip
8)   Install virtualenv  if you need that for multiple environments with independent dependencies in each, good for developers:::::
pip2.7    install    virtualenv
That is all now.

Leave a Reply

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

You are commenting using your 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

%d bloggers like this: