0
$ sudo apt-get install python2.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:

The following packages have unmet dependencies:
python:i386 : Depends: python2.7:i386 (>= 2.7.5-1~) but it is not going to be installed
              Depends: python-minimal:i386 (= 2.7.5-5ubuntu3) but it is not going to be installed
              Depends: libpython-stdlib:i386 (= 2.7.5-5ubuntu3) but it is not going to be installed
python2.7 :   Depends: python2.7-minimal (= 2.7.12-1~trusty1) but it is not going to be installed
              Depends: libpython2.7-stdlib (= 2.7.12-1~trusty1) but it is not going to be installed

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Earlier I had used sudo apt-get autoremove 'python.*' command and now I am getting installation and dependencies issues while downloading Python 2.7.

I need to download Python 2.7.

David Foerster
  • 36,890
  • 56
  • 97
  • 151

1 Answers1

0

For the more technical, you could build your own from source.

1 - Download and extract v2.7.6 - https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz

wget https://www.python.org/ftp/python/2.7.5/Python-2.7.6.tar.xz && tar -xJvf Python-2.7.6.tar.xz

2 - Move into the dir

cd Python-2.7.6

3 - Configure

./configure

4 - Make & install

make && sudo make install

5 - Check

python command should bring up a prompt containing something like

Python 2.7.6 (default, Nov 23 2017, 15:49:48) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
ggdx
  • 109