Skip to content

Instantly share code, notes, and snippets.

@sunnykrGupta
Forked from selfboot/centos_python.sh
Created February 1, 2017 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunnykrGupta/c10584ffa8dea7a0e961443338c11a1b to your computer and use it in GitHub Desktop.
Save sunnykrGupta/c10584ffa8dea7a0e961443338c11a1b to your computer and use it in GitHub Desktop.
CentOS 6.8: Install Python 2.7.10, pip, virtualenv, and virtualenvwrapper on CentOS
#!/bin/bash
# According to:
# How To Set Up Python 2.7.6 and 3.3.3 on CentOS 6.4
# https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4
yum -y update
yum groupinstall -y 'development tools'
yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel
yum install xz-libs
wget http://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
xz -d Python-2.7.10.tar.xz
tar -xvf Python-2.7.10.tar
cd Python-2.7.10
./configure --prefix=/usr/local
make
make altinstall
export PATH="/usr/local/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment