I was trying to upgrade my python from 2.7.x to 2.7.16 and ended up completely manually removing python and installing it from source as I was having issues. Now I want to install python-pip (from apt) but apt doesn't seem to realize python is installed and wants to install (the old version) on top of mine.
ubuntu@ubuntu:~/$ dpkg --configure dpkg: error: --configure needs at least one package name argument Type dpkg --help for help about installing and deinstalling packages [*]; Use 'apt' or 'aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files; Options marked [*] produce a lot of output - pipe it through 'less' or 'more' ! ubuntu@ubuntu:~/$ apt install --reinstall python-pip 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-pip : Depends: python:any (< 2.8) Depends: python:any (>= 2.7.5-5~) Recommends: python-all-dev (>= 2.6) but it is not going to be installed Recommends: python-setuptools but it is not going to be installed python-pkg-resources : Depends: python:any (< 2.8) Depends: python:any (>= 2.7.5-5~) python-wheel : Depends: python:any (< 2.8) Depends: python:any (>= 2.7.5-5~) E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). ubuntu:~/$ apt -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: libpython-all-dev libpython-dev libpython2.7 libpython2.7-dev python2.7-dev Use 'apt autoremove' to remove them. The following additional packages will be installed: python Suggested packages: python-doc python-tk The following NEW packages will be installed: python 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. 3 not fully installed or removed. Need to get 137 kB of archives. After this operation, 650 kB of additional disk space will be used. Do you want to continue? [Y/n] n Abort. ubuntu@ubuntu:~/$ which python /usr/local/bin/python ubuntu@ubuntu:~/$ python -V Python 2.7.16