Posts

Showing posts from July, 2017

Installing Python 2.7.13 on CentOS 6.5

This post describes how to install python 2.7 from source without affecting the existing python installation. It'll install the python2.7 in a separate location other than the standard location in CentOS. Install required packages:  yum -y update yum groupinstall -y 'development tools' yum install -y gcc zlib-devel bzip2-devel openssl-devel xz-libs wget Download and extract python source: wget http://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz  xz -d Python-2.7.13.tar.xz  tar -xvf Python-2.7.13.tar Create a directory where to install python e.g. ~/localpython: mkdir /home/nayan/localpython Go to extracted python source directory: cd Python-2.7.13 Run the configure: ./configure --prefix=/home/nayan/localpython --enable-shared Compile and install it:  make make altinstall Check if python installed by running python2.7 Make a link to Python library path: On 32 bit OS ln -s /home/nayan/localpython/lib/libpython2.7.so.1.0 /usr