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’ll run into that on many distros,
not only Debian, since most of the distros use a specific python version for OS packages, its recommended to leave the python for your OS unchanged.
But VirtualBox is not a good idea either.
Instead use a venv (virtual environment),
which is the python way to develop/run under different python versions.
https://docs.python.org/3/library/venv.html
I always do ‘python3 -m venv venv’
Then activate. Then your usually good.
Maybe not for Python, but if the database project they’re contributing to relies heavily on modified system libraries, it can be useful to isolate those from your host. Using either a VM or a container can do that.
I know
venvpretty well, but it does not do it for this project. It’s not about isolating the Python libraries, but the system libraries and more importantly the databases the program itself creates. Also I would never install packages into a Python system installation.As @solrize@lemmy.ml already mentioned: Download the python 3.10 source tarball from python.org, unpack, compile and install it. Then run the python3.10 binary with the venv option in the path where you want your venv to be created. By this, the created venv is configured to use the desired (3.10) version of python, not your system’s default version.
If you’re gonna compile python, I’d suggest using pyenv to automate the process and provide stubs.