Hacker News new | ask | show | jobs
by ranger_danger 235 days ago
Incompatible with the default Ubuntu 22.04 LTS python version, just FYI (uses 3.10 whereas the minimum is now 3.12).
6 comments

You can always use pyenv to install any Python on any mainstream Linux. I only use pyenv Python to develop on any laptop or any server. My dev laptop is still Ubuntu 22.04 and I have any Python from 2.7 to 3.14 .

https://github.com/pyenv/pyenv

Simple Python version management

Wow I had no idea about that, thanks!
Building Python from source is trivial, I wouldn't let the distro dictate what I can and can't use for such an important part of the stack.
Ops here, using System Python is always asking for trouble, just put Django into a container and call it a day.
What kind of trouble? That's all I've ever used for the last 15 years of my professional Django work and never had any issues...
Incompatibility with Python version in current LTS Ubuntu sounds like an issue to me.

FWIW I used to be fine with just dealing with system Python, like you, but recent tools like uv make it so easy and convenient to isolate interpreters and dependencies per project that I'm just not going back.

Anything involving Distro updating. There is no reason not to use containers except Docker Build scary!
If you need Python 3.12 you should update to Ubuntu 24.04 if you want to stick with distro packages.
Is this handled by uv or do you need to use deadsnakes ppa?
If anything, you'd need the opposite, as deadsnakes is old versions (OP needs a new version).
deadsnakes has 3.13.8, 3.14.0 and 3.15-a1 for 22.04: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa?field....
Oh interesting, I didn't realize they started including newer versions. I guess that makes the name a misnomer then...
Yes, that's pretty typical. I think there's a general assumption if you're using older python you'll probably stick to Django LTS 5.2 from this April which still supports Python 3.10.

They only drop python versions right after LTS (which is part of why they increase the major version at that point). https://docs.djangoproject.com/en/dev/faq/install/#what-pyth...

Also Django LTS 5.2 is supported a year longer than Ubuntu 22.04. (April 2028 vs April 2027)