Last active
December 17, 2015 02:08
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 | |
# | |
# setup_python-2.7.4.sh - Installs Python-2.7.4 and 3 useful modules, setuptools, pip, virtualenv. | |
# | |
aptitude update | |
aptitude -y install build-essential | |
# Set your work directory and install directory. | |
WORK_DIR=~/source | |
INSTALL_DIR=/opt | |
if [[ ! -d $WORK_DIR ]]; then | |
mkdir -p $WORK_DIR | |
fi | |
if [[ ! -d $INSTALL_DIR ]]; then | |
mkdir -p $INSTALL_DIR | |
fi | |
cd $WORK_DIR | |
wget http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tgz | |
tar zxvf Python-2.7.4.tgz | |
cd Python-2.7.4 | |
./configure --prefix=$INSTALL_DIR/python-2.7.4 | |
make | |
make install | |
cat << EOF > ~/pyenvrc | |
export PATH=$INSTALL_DIR/python-2.7.4/bin:\$PATH | |
EOF | |
source ~/pyenvrc | |
cd $WORK_DIR | |
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz | |
tar zxvf setuptools-0.6c11.tar.gz | |
cd setuptools-0.6c11 | |
python setup.py install | |
easy_install pip | |
pip install virtualenv | |
#pip install fabric | |
#pip install fabtools | |
#pip install cuisine | |
pip freeze |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment