UnixServerAdmin

Server Administration & Management

How to install Python 2.6 from source code

# cd /usr/local/src

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

# tar zxvf Python-2.6.5.tgz

# cd Python-2.6.5

# ./configure –prefix=/usr/python2.6 –with-threads –enable-shared

# make

# make install

Now set symlink

# ln -s /usr/python2.6/bin/python /usr/bin/python2.6

Add python lib path

# echo ‘/usr/python2.6/lib’ >> /etc/ld.so.conf.d/python2.6.conf

# ldconfig

Now check python working by running

# /usr/bin/python2.6

Advertisements

June 4, 2012 Posted by | Tips & Tricks, Unix/Linux | , , , , | Leave a comment