Score:2

What's the default Python version in Ubuntu 22.04?

eu flag

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 .

nobody avatar
gh flag
`readlink -f /usr/bin/python3 /usr/bin/python3.10` python3.10 is default.
uz flag
Jos
Same here, `python3.10`
frewper avatar
eu flag
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 ?
Bodo avatar
pt flag
Does `sudo update-alternatives --config python3` help? Or did you manually change the link before?
user535733 avatar
cn flag
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.
frewper avatar
eu flag
I had to change it because of the application that is installed. Cant really help it there.
us flag
@frewper What do you mean by `because of the application that is installed`? Did the python version automatically change during the upgrade process?
us flag
Consider reinstalling default version of python with `sudo apt install --reinstall python3`.
frewper avatar
eu flag
no I mean the application needed a higher version of Python. i.e 3.10. Hence it was upgraded on 20.04. Now Since Ubuntu needed to be upgraded to 22.04, is when i got this issue.
frewper avatar
eu flag
@ArchismanPanigrahi If I just reinstall Python3 doesnt that just upgrade the version of Python? That may not work since I am already on a higher version than what 22.04 comes with.
user535733 avatar
cn flag
"*Cant really help it there*" yes you could have: Virtual environments for different versions. Or a different release of Ubuntu that did meet the requirements. You mangled your Ubuntu system into a [Frankensystem](https://wiki.debian.org/DontBreakDebian) by choice.
Score:2
cn flag

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

frewper avatar
eu flag
Does it mean I need to downgrade from 3.10.9 to 3.10.4 ?
user535733 avatar
cn flag
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.