-
-
Save joseguzman1337/2196035667b41107d903ebc5a771d956 to your computer and use it in GitHub Desktop.
How to install python 2.7 on debian
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
sudo -i | |
for pkg in $(dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'); do apt-get -y --allow-downgrades install --reinstall $pkg ; done | |
sudo apt install aptitude -y && sudo aptitude install libsqlite3-dev -y && sudo wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz && sudo tar -xzf Python-2.7.18.tgz && cd Python-2.7.18 | |
./configure --prefix=/usr --prefix=/home/python27 --enable-shared --enable-loadable-sqlite-extensions --enable-optimizations | |
sudo make && sudo make install | |
./configure; make libinstall; make sharedinstall | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10 | |
sudo update-alternatives --set python /usr/bin/python2.7 && cd | |
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py | |
python get-pip.py | |
/usr/bin/python -m pip install --upgrade pip | |
apt install python3 python3-pip ipython3 && pip3 -V | |
curl https://bootstrap.pypa.io/get-pip.py | sudo python3 | |
apt install python-pip -y | |
pip2 -V && pip -V | |
(optional) | |
wget http://peak.telecommunity.com/dist/ez_setup.py | |
sudo python2.7 ez_setup.py | |
sudo easy_install-2.7 virtualenv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment