Skip to content

Instantly share code, notes, and snippets.

@pswaminathan
Forked from willfill/python27_on_debian.sh
Last active December 16, 2015 17:38
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 pswaminathan/5471352 to your computer and use it in GitHub Desktop.
Save pswaminathan/5471352 to your computer and use it in GitHub Desktop.
Only needed for debian<=6
sudo apt-get install build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libbz2-dev libreadline5-dev libssl-dev libdb-dev
#for lxml
sudo apt-get install libxml2-dev
sudo apt-get install libxslt1-dev
#for mysql client
sudo apt-get install libmysqlclient-dev
# On OS X instead (assuming brew installed...)
brew install mysql
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xzf Python-2.7.3.tgz
cd Python-2.7.3
./configure --prefix=/usr --enable-shared
make
sudo make install
cd ..
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.6 20
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10
sudo update-alternatives --set python /usr/bin/python2.6
#wget http://peak.telecommunity.com/dist/ez_setup.py
#sudo python2.7 ez_setup.py
#sudo easy_install pip
#sudo pip install virtualenvwrapper
#config virtualenvwrapper
#to .profile paste:
# export WORKON_HOME=$HOME/envs
# source /usr/local/bin/virtualenvwrapper.sh
# sudo pip install pycrypto
# sudo pip install paramiko
# sudo pip install mysql-python
# sudo pip install requests
# sudo pip install beautifulsoup4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment