-
-
Save srusskih/3973440 to your computer and use it in GitHub Desktop.
update to python 2.7 on debian 6
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/sh | |
cd /tmp/ | |
sudo apt-get install build-essential | |
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz | |
tar -xzf Python-2.7.2.tgz | |
cd Python-2.7.2 | |
sudo apt-get install libsqlite3-dev zlib1g-dev libncurses5-dev | |
sudo apt-get install libgdbm-dev libbz2-dev libreadline5-dev | |
sudo apt-get install libssl-dev libdb-dev | |
./configure --enable-shared | |
make | |
sudo make install | |
sudo ldconfig | |
sudo update-alternatives --install /usr/bin/python python /usr/local/bin/python2.7 10 | |
# copy package from prev env, case some packages need recomplation | |
wget http://peak.telecommunity.com/dist/ez_setup.py | |
python ez_setup.py | |
sudo easy_install pip | |
/usr/bin/python2.6 pip freeze > freeze.txt | |
while read p; do | |
sudo pip install --upgrade $p | |
done < freeze.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment