9

I am trying to upgrade from 20.04 to 22.04

During update, I get an error

Your python3 install is corrupted. Please fix the ’/usr/bin/python3’ symlink.

I know changing the symlink to the correct version should help. But I cannot Find info as to which version of Python does Ubuntu 22.04 ship with.

If anyone can tell that will be great .

11
  • readlink -f /usr/bin/python3 /usr/bin/python3.10 python3.10 is default.
    – nobody
    Commented Jan 20, 2023 at 12:35
  • Same here, python3.10
    – Jos
    Commented Jan 20, 2023 at 12:35
  • My current version on 20.4 is Python 3.10.9, but upgrade is not going forward. What is the minor number that showing on your side ?
    – frewper
    Commented Jan 20, 2023 at 12:47
  • Does sudo update-alternatives --config python3 help? Or did you manually change the link before?
    – Bodo
    Commented Jan 20, 2023 at 13:36
  • 3
    Never, ever change the Ubuntu-provided version of Python. That causes big problems, as you have discovered to your sorrow. Use virtual environments for other releases of Python. Or use six-month releases of Ubuntu (instead of LTS) to get newer software. You must uninstall those non-Ubuntu Python 3.10 packages and restore your older version of Python for the release-upgrade to work. Or backup your data and fresh-install 22.04...or 22.10.
    – user535733
    Commented Jan 20, 2023 at 14:38

1 Answer 1

7

https://packages.ubuntu.com will readily provide current package version information for all supported releases of Ubuntu.

For example, here's a search of that website for the python3 package in jammy (22.04):

  • You can see that the package version is 3.10.4.

https://packages.ubuntu.com screenshot

2
  • Does it mean I need to downgrade from 3.10.9 to 3.10.4 ?
    – frewper
    Commented Jan 20, 2023 at 15:42
  • 1
    No, it means the final result will be 3.10.4. You must downgrade to a lower version (3.10.3 or lower) AND disable all non-Ubuntu sources so apt will properly upgrade you to the correct version from the correct source.
    – user535733
    Commented Jan 20, 2023 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .