0

I followed this tutorial to upgrade python:

https://tech.serhatteker.com/post/2019-12/upgrade-python38-on-ubuntu/

Then I ran

sudo apt update && sudo apt upgrade

but the system refused with the error:

Setting up python3-apt (1.6.6) ...
E: py3compile:243: Requested versions are not installed
dpkg: error processing package python3-apt (--configure):
 installed python3-apt package post-installation script subprocess returned error exit status 3
dpkg: dependency problems prevent configuration of python3-update-manager:
 python3-update-manager depends on python3-apt (>= 0.8.5~); however:
  Package python3-apt is not configured yet.

dpkg: error processing package python3-update-manager (--configure): dependency problems - leaving unconfigured Setting up python3-minimal (3.6.7-1~18.04) ... E: py3compile:243: Requested versions are not installed dpkg: error processing package python3-minimal (--configure): installed python3-minimal package post-installation script subprocess returned error exit status 3 dpkg: dependency problems prevent configuration of python3-distupgrade: python3-distupgrade depends on python3-update-manager (>= 1:18.04.11.9~); however: Package python3-update-manager is not configured yet. python3-distupgrade depends on python3-apt (>= 0.8.5~); however: Package python3-apt is not configured yet.

dpkg: error processing package python3-distupgrade (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ubuntu-advantage-tools: ubuntu-advantage-tools depends on python3-apt; however: Package python3-apt is not configured yet.

dpkg: error processing package ubuntu-advantage-tools (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-core: ubuntu-release-upgrader-core depends on python3-distupgrade (= 1:18.04.45); however: Package python3-distupgrade is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-core (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: python3-apt python3-update-manager python3-minimal python3-distupgrade ubuntu-advantage-tools ubuntu-release-upgrader-core E: Sub-process /usr/bin/dpkg returned an error code (1)

What's wrong"?

  • 2
    Did you read the "Disclaimer" in the red box on the webpage you mentioned? – Marco Jun 02 '23 at 11:14
  • 1
    Ubuntu 18.04 LTS has reached the end of it's standard support life thus is now off-topic here unless your question is specific to helping you move to a supported release of Ubuntu. Ubuntu 18.04 ESM support is available, but not on-topic here, see https://askubuntu.com/help/on-topic See also https://ubuntu.com//blog/18-04-end-of-standard-support No supported release of Ubuntu uses python 3.6 – guiverc Jun 02 '23 at 11:16
  • @guiverc yes I want to move to ubuntu 20, since many python libraries depend on it,18 is just too old by now. But I'm stuck. – Mohammed Baashar Jun 02 '23 at 11:22
  • You won't be able to release-upgrade to 20.04 until your python3 is returned back to defaults; as many Ubuntu tools rely on python3 and won't work correctly if default python3 version is changed. – guiverc Jun 02 '23 at 11:24
  • @guiverc "python -V" gives me Python 3.8.0 which is correct. "python3" also opens shell on version 3.8.0 – Mohammed Baashar Jun 02 '23 at 11:29
  • 2
    Your decisions to change the version of Python3 and to wait until the very last moment to release-upgrade were both unwise, and the consequence is that your system is now grievously damaged and no longer supported by us to assist in repair. Advice: Back up your data and clean-install a supported release of Ubuntu. – user535733 Jun 02 '23 at 12:13
  • Just if somebody fell in the same hell: https://askubuntu.com/questions/1384559/error-dpkg-python

    this problem is identical to mine.. I will try to check the SYSLINKS as a final resort before doing the suggested solutions of @user535733

    – Mohammed Baashar Jun 02 '23 at 15:14

0 Answers0