Ubuntu 20.04
When I tried to do sudo apt-get upgrade
it gives me this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/230 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up python3-apt (2.0.0ubuntu0.20.04.5) ...
/var/lib/dpkg/info/python3-apt.postinst: 6: py3compile: not found
dpkg: error processing package python3-apt (--configure):
installed python3-apt package post-installation script subprocess returned error exit status 127
dpkg: error processing package python3-pip (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Setting up python3-minimal (3.8.2-0ubuntu2) ...
/var/lib/dpkg/info/python3-minimal.postinst: 5: py3compile: not found
dpkg: error processing package python3-minimal (--configure):
installed python3-minimal package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python3-apt
python3-pip
python3-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried sudo apt install -f --reinstall python3-minimal
It didn't help and
it returns:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/230 kB of archives.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for python3-minimal:amd64
this error occurred after i tried to upgrade python3.9
I'm new with ubuntu so I will be glad for some help with that.