0

deadsnakes recently removed support for Ubuntu 20.04: https://github.com/deadsnakes/py3.11/commit/54c42edda82a91620e5c26b5e27eeda1527e2cff

So, currently, trying to install any version of python newer than 3.9 will result in an error.

user@b5c6a363ca19:~$ apt-cache search python3 | grep "^python3.[0-9]"  
python3.8 - Interactive high-level object-oriented language (version 3.8)  
python3.8-dbg - Debug Build of the Python Interpreter (version 3.8)  
python3.8-dev - Header files and a static library for Python (v3.8)  
python3.8-doc - Documentation for the high-level object-oriented language Python (v3.8)  
python3.8-examples - Examples for the Python language (v3.8)  
python3.8-minimal - Minimal subset of the Python language (version 3.8)  
python3.8-venv - Interactive high-level object-oriented language (pyvenv binary, version 3.8)  
python3.8-full - Python Interpreter with complete class library (version 3.8)  
python3.9 - Interactive high-level object-oriented language (version 3.9)  
python3.9-dbg - Debug Build of the Python Interpreter (version 3.9)  
python3.9-dev - Header files and a static library for Python (v3.9)  
python3.9-doc - Documentation for the high-level object-oriented language Python (v3.9)  
python3.9-examples - Examples for the Python language (v3.9)  
python3.9-full - Python Interpreter with complete class library (version 3.9)  
python3.9-minimal - Minimal subset of the Python language (version 3.9)  
python3.9-venv - Interactive high-level object-oriented language (pyvenv binary, version 3.9)  

user@b5c6a363ca19:~$ sudo apt install python3.11  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
E: Unable to locate package python3.11  
E: Couldn't find any package by glob 'python3.11'  

I know I can use Astral's uv to install multiple python versions, but I would like to have it as alternatives to the default system python and in PATH.

Any other easy way of installing newer python versions in Ubuntu 20.04? Like just run a command and install, not compile from source.

9
  • Have you explored Ubuntu backports? I've not checked myself so it may not help, but it's worth looking into. Commented Nov 1 at 10:16
  • 1
    Note there's a StackExchange site dedicated to Ubuntu (the question is still on-topic here). Commented Nov 1 at 10:31
  • 1
    askubuntu.com/questions/1559112/… Nothing else to add. Commented Nov 1 at 11:23
  • Yeah the question got closed there because it's an unsupported release. Not sure what the downvotes here are about. Just because Ubuntu may withdraw support doesn't change a real world fact that some people cannot migrate off EOL versions so easily. Commented Nov 1 at 11:55
  • 1
    @PhilipCouling I already have backports in my sources.list: deb [arch=amd64] archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse Not sure if there are others. Commented Nov 1 at 13:14

1 Answer 1

2

Ubuntu

Ubuntu 20.04 is end of life since 31 May 2025 and only gets Expanded Security Maintenance. A responsible thing to do is to have Ubuntu Pro subscription to keep getting security updates. Or equivalent third party update service, but I do not know anyone else maintaining Ubuntu main past 5 years.

Python

Newer python packages are not included in main, you will also need to find someone to maintain those.

I agree to search for binary releases, so others can reproduce your Python environments exactly. Deb package format is preferable so it can be maintained with apt same as everything else, and is set up like Debian. However, if some other build functions, like from uv python install, and you trust those people, do not disqualify this as an option. You can install system wide and on PATH if desired.

You may need to do some technical packaging work yourself, or perhaps financially sponsor someone who can. There is limited interest in someone doing builds for free, even for software as popular as Python, even for a distro only 5 years old.

Upgrading Ubuntu for newer software, not upgrading and software is on old Python for the rest of its life, or some organization keeping their builds private are all reasons why public backports that far back are not popular.

In the issue tracker for the deadsnakes PPA, a maintainer makes it clear they have no time or space to maintain older releases, and PPA hosting will not allow new uploads anyway.

They may be open to private arrangements to provide binary builds to old releases. Or to someone else resurrecting the patches and doing their own builds.

end-of-lifed ubuntu distributions #251

asottile opened on Jun 5, 2023 Member

a reminder: I provide deadsnakes on my own time for free. I am not paid to provide these packages and though I have some limited sponsorship through github sponsors it is nowhere near a sustainable income or even close to what would cover the time I invest into deadsnakes.

packages are deleted from deadsnakes once a distribution version reaches end-of-life

launchpad provides us a limited amount of space and prevents uploading packages to an end-of-lifed distribution. as such to clear up space for newer python versions and newer ubuntu releases old ones are deleted.

fortunately, if one were willing to roll up their sleeves a bit: one can take the existing sources, rebase the patches against newer python versions, and build binary packages for them

if one needs binary builds for end-of-lifed distributions I can be contracted to build those. please contact me at my github email address (you can find it in my commits -- the .edu one) with the following information: (1) do you need hosting? (if so: estimate how many machines will be running apt install / apt upgrade) (2) what python version(s) and distribution(s) do you need (3) do you need security patches / what is your SLA for patched software

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.