Skip to content

Instantly share code, notes, and snippets.

@pmbauer
Last active December 14, 2015 23:29
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 pmbauer/5166100 to your computer and use it in GitHub Desktop.
Save pmbauer/5166100 to your computer and use it in GitHub Desktop.
# wget -O https://gist.github.com/pmbauer/5166100/raw/c72b880ba82dfd598c3cf27a3045833cadec32e2/install_python.sh
# chmod +x install_python.sh
# ./install_python.sh
#!/bin/sh
pushd /usr/local/src
echo " - Install compilers"
yum -y install gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-devel sqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel make
#
echo " - Get source for Python"
wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar xf Python-2.7.3.tar.bz2
echo " - Compile Python source"
pushd Python-2.7.3
./configure --prefix=/usr/local --with-threads
make && make altinstall
popd
echo " - Installing Distribute for python2.7"
wget --no-check-certificate http://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz
tar xf distribute-0.6.49.tar.gz
pushd distribute-0.6.49
python2.7 setup.py install
popd
echo " - Install pip."
easy_install-2.7 pip
echo " - Install virtualenv."
pip install virtualenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment