this post was submitted on 02 Jan 2026
32 points (84.8% liked)

Linux

10965 readers
419 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

I wanted to start contributing to an open source software project yesterday evening, and they recommend virtual box to not mess with your default installation of the program and the databases it uses.

So I thought Debian would be a nice clean distro for developing Python... Gnome feels really unusual to me and I hate it, I guess I can replace it with KDE.

But I couldn't install a specific Python version? System python is 3.13 but I needed 3.10. I tried adding the deadsnake ppa but Debian didn't know the add-apt-repository command. So I tried to install software-properties-common which also failed because the package couldn't be located. Someone on SO said it was removed because security but I mean wtf? So the solution is to add this package cgabbelt manually to sources.list but I couldn't get it to run because I couldn't verify the GPG key... Then I went to sleep.

I am pretty sure this community can help with the problem, but honestly, wtf? I am not a Linux power user but a data scientist who works on Linux for a couple of years now, how is it possible installing a specific Python version is such a hassle?

Is Debian just a poor choice for developing? The software I want to contribute to has many dependencies, they recommend Ubuntu but fuck Ubuntu. So I guess I can't take something too exotic.

you are viewing a single comment's thread
view the rest of the comments
[–] lime@feddit.nu 46 points 6 days ago (2 children)

use something like uv to install whatever python version you want and set up a venv with it. that way you can have project-specific python versions.

[–] Olap@lemmy.world 13 points 6 days ago (1 children)

Seconding uv and adding docker-compose for running dev DBs/services as my recommendation

[–] technom@programming.dev 8 points 6 days ago (1 children)

... and adding docker-compose for running dev DBs/services ...

If you're into that sort of setup, you might appreciate testcontainers.

[–] PolarKraken@programming.dev 1 points 3 days ago

If you've already got Docker available, testcontainers is awesome!!

I like little SQLite in-memory DBs for testing sometimes but just accepted the annoying friction of a slightly different SQL dialect (typically use PG). Testcontainers was a "have my cake and eat it too" situation, really like it.

[–] gigachad@piefed.social 7 points 6 days ago (1 children)

Now I found a use case for UV! I am a long time venv user and was always struggling to understand why I should add another complex layer of software into my pipeline. Also when I last tried UV, the recommended way to install it was piping arbitrary code from curl into bash, but maybe that has changed. I have a look, thanks!

That is a good solution to my problem - but what is the problem with Debian? Am I too old, and is it a bad idea to install a specific Python installation directly into the system?

[–] lime@feddit.nu 7 points 6 days ago (1 children)

i mean python is 99% backwards compatible so as long as you tell your tooling you're working with 3.10 it will warn you about using stuff that's too new. that's why the shipping version is usually enough. in general it's not recommended to have multiple versions of python3 installed at the same time, but if you are a habitual venv user it's usually not a problem. however i have also run into the issue of some versions being "too new" for a project, where the thing just would not work with newer versions.

basically, if your issue is only that you don't want to "contaminate" an older codebase, that can be solved by configuring your tooling. but if your issue is that the thing just doesn't work with the "wrong" version, you're probably best of using a container. a user installation of the version you want will work but having multiple installations is annoying.

[–] gigachad@piefed.social 3 points 6 days ago

It's not so much about Python itself but the libraries it uses. I experienced very often that the module maintainers for specific libraries require time to port to a newer Python version, and if it only means testing it against it. This is why I have the habit of staying on "2 version older" than the current release. As a data scientist this always made sense for me, I cannot count the times an environment broke because there was a conflict with the Python version. I guess you are right and it probably runs fine. I just wanted to set up my development environment right the first time to save some struggle later. Thanks for your input.