Skip to content

Instantly share code, notes, and snippets.

@nico4
Last active August 29, 2015 13:57
Show Gist options
  • Save nico4/9616855 to your computer and use it in GitHub Desktop.
Save nico4/9616855 to your computer and use it in GitHub Desktop.
Install Python2.7 on Centos

Install Python2.7 from sources

Prerequisites:

$ yum groupinstall 'development tools'
$ yum install zlib-devel bzip2-devel openssl-devel wget

Get Python sources:

$ wget http://legacy.python.org/ftp//python/2.7.6/Python-2.7.6.tgz
$ tar xzf Python-2.7.6.tgz

Building Python:

$ cd Python-2.7.6
$ ./configure
$ make
$ make install

Install setuptools:

$ wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-3.3.tar.gz
$ tar xzf setuptools-3.3.tar.gz
$ cd setuptools-3.3
$ python2.7 setup.py install

Install pip:

$ wget --no-check-certificate https://raw.github.com/pypa/pip/master/contrib/get-pip.py
$ python2.7 get-pip.py

Install virtualenv:

$ pip2.7 install virtualenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment