0

I am updating my Python and can not get through. The systems suggest using sudo apt-get -f install, however, it does not work either. How can I solve this issue?

$sudo apt-get -f install
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  python3-update-manager update-manager
The following packages will be upgraded:
  python3-update-manager update-manager
2 upgraded, 0 newly installed, 0 to remove and 59 not upgraded.
11 not fully installed or removed.
Need to get 0 B/574 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 405655 files and directories currently installed.)
Preparing to unpack .../python3-update-manager_1%3a16.04.4_all.deb ...
/var/lib/dpkg/info/python3-update-manager.prerm: 6: /var/lib/dpkg/info/python3-update-manager.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/python3-update-manager_1%3a16.04.4_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python3-update-manager.postinst: 6: /var/lib/dpkg/info/python3-update-manager.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../update-manager_1%3a16.04.4_all.deb ...
/var/lib/dpkg/info/update-manager.prerm: 6: /var/lib/dpkg/info/update-manager.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/update-manager_1%3a16.04.4_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/update-manager.postinst: 6: /var/lib/dpkg/info/update-manager.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/python3-update-manager_1%3a16.04.4_all.deb
 /var/cache/apt/archives/update-manager_1%3a16.04.4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
muru
  • 207,228
DEu
  • 1

1 Answers1

1

Be sure to update your repositories, then the system files. Then perform a reinstall of python3.

(The $ represents the command prompt you see in the terminal screen. The command is what follows the $ prompt.):

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install python3-minimal
$ sudo apt install --reinstall python3

Then from there add some of the other packages you might need from the repository. You can get a list of the default repository packages with:

$ apt-cache search "^python3" | less
L. D. James
  • 25,444