Skip to content

Instantly share code, notes, and snippets.

@ellmetha
Last active October 11, 2015 20:47
Show Gist options
  • Save ellmetha/bee4688c0c484012d9bd to your computer and use it in GitHub Desktop.
Save ellmetha/bee4688c0c484012d9bd to your computer and use it in GitHub Desktop.
Python 2.7 & virtualenv installation on Alwaysdata
#!/bin/bash
# Python 2.7 installation
mkdir -p $HOME/.python/src
cd $HOME/.python/src
wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz --no-check-certificate
tar xvfz Python-2.7.6.tgz
cd Python-2.7.6
mkdir $HOME/.python/python2.7
./configure --prefix=$HOME/.python/python2.7
make
make install
cd ..
# .bash_profile configuration
echo "export PATH=$HOME/.python/python2.7/bin:$PATH" >> ~/.bash_profile
source ~/.bash_profile
# Pip & SetupTool installation
cd ~/.python/src
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-3.5.tar.gz --no-check-certificate
tar xvfz setuptools-3.5.tar.gz
cd setuptools-3.5
python setup.py install
cd ..
wget https://pypi.python.org/packages/source/p/pip/pip-1.5.5.tar.gz --no-check-certificate
tar xvfz pip-1.5.5.tar.gz
cd pip-1.5.5
python setup.py install
echo "export PIP_REQUIRE_VIRTUALENV=false" >> ~/.bash_profile
cd
source .bash_profile
# Virtualenv installation
pip install virtualenv
pip install virtualenvwrapper
mkdir ~/.virtualenvs
echo ". $HOME/.python/python2.7/bin/virtualenvwrapper.sh" >> .bash_profile
source .bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment