https://itectec.com/ubuntu/ubuntu-errors-processing-python-packages-in-output-of-every-apt-command/
Multiple packages are trying to run the pycompile
program during their execution. dpkg-query -S */pycompile
tells us that pycompile
is a program that is part of the python-minimal
package. Apt doesn't complain about the missing package, but it seems the program is missing nonetheless. You can restore the corrupted package with:
sudo apt-get install -f --reinstall python-minimal
If Apt complains that it cannot re-install that package (e. g. because half-installed packages), we need to go deeper and download and install the package manually:
cd /tmp
apt-get download python-minimal
sudo dpkg -i python-minimal_*.deb
sudo apt-get install -f