

When I try to reinstall python apt to fix this problem with sudo apt install -reinstall python-apt, I get the following error.

Installed python-apt package post-installation script subprocess returned error exit status 127Įrrors were encountered while processing:Į: Sub-process /usr/bin/dpkg returned an error code (1) var/lib/dpkg/info/python-apt.postinst: 6: pycompile: not foundĭpkg: error processing package python-apt (-configure): DoneĠ upgraded, 0 newly installed, 0 to remove and 0 not upgraded.Īfter this operation, 0 B of additional disk space will be used.

When I then try to run sudo apt-get upgrade, I run into the following problem. Whenever I try to run sudo apt-get update it works as expected. Sudo update-alternatives -config python3, but this seems to have caused a problem with apt somewhere. I recently updated my python release from 3.8 to 3.10, using
