Yes, I'm a moron, and I tried to manually install a higher point release of python 2.7.16 to /usr/bin/ (i did ./configure --prefix=/usr
) on my Ubuntu 16.04 machine. It seems to work fine EXCEPT for packages that depended on python, like apt-listchanges
, which fails with messages like ImportError: No module named apt_pkg
there's no make uninstall
available, I've tried manually removing files, and still when I try apt --reinstall install python
, Nothing gets overwritten and the python executable still gives the new 2.7.16
version…
Any idea how to get the official repository version back??
Best Answer
To find out which package installed a file you can use
apt-file
, you can install it withand find the package with
so in this case
which revealed
python2.7-minimal
, reinstalling this package solved the problem, in this case OP reinstalled some other packages as well to be sure everything works fine: