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.

  • gigachad@piefed.socialOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    14 hours ago

    Thanks so much for your efforts writing this up. I will study it and come back if I have any doubts.

    The reason I use VirtualBox is simply, that it is the recommendation in the developers guidelines of the project, which is gramps by the way.

    I have basic experience with Docker, I managed to build a container that runs with alls dependencies based on alpine, then it struck me - I don’t have a GUI in my container which I need of course to run my IDE and the software itself. I read about X11 forwarding but then wasn’t sure if that is the right way. I am pretty sure one can isolate some things using docker-compose, but it can be frustrating if you want to get into the project codebase and then have to do so much infrastructure stuff.

    I guess it is a combination of lack of skills (I derive data from data for my job, ML etc.) and the project itself using outdated methods because of historical development.

    But as I said, I need to do my research. Thanks again for your friendly way of explaining things, much appreciated.

    • TechNom (nobody)@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 hours ago

      The reason I use VirtualBox is simply, that it is the recommendation in the developers guidelines of the project

      That’s a perfectly reasonable requirement. The problem here is that solution space is like the JavaScript ecosystem. There are more solutions than you can count and no two developers ever agree on everything. Everyone eventually settles down on one solution or the other based on their personal preferences. That’s why I thought it was important to give you an overview rather than a definite solution.

      I just want to add that VirtualBox is a backend to ‘Vagrant’. Developers usually depend on Vagrant, rather than fiddle with VirtualBox directly. Vagrant takes care of some low-level VM configuration on its own and consistently recreates the VM every time with little fuss. You will need a configuration file for the VM (Vagrantfile), either readily available or newly written. I recommend Vagrant rather than direct vbox due to its convenience. However, I’m not pushing it further since I can’t judge your options better than you.

      I am pretty sure one can isolate some things using docker-compose, but it can be frustrating if you want to get into the project codebase and then have to do so much infrastructure stuff.

      Certainly! That’s what tools like vagrant are meant for. The only problem is that it replaces tediousness with choice fatigue!

      I don’t have a GUI in my container which I need of course to run my IDE and the software itself.

      This is where the convenience of tools like VM, devpod, etc shines. However, you can also implement this solution manually with VMs or Docker. It’s simple - bind mount the source directory on host into the VM/container. Then you can edit it using devtools and IDE from both the host and the VM. Tools like vagrant and devpod manages this for you.

      However, the situation gets a bit tricky when you want to use GUI applications inside the VM/container. That involves mounting the X11/Wayland socket from the host into the VM/Container, doing the correct UID/GID mapping and setting the correct file permissions. Developers usually don’t do this manually since it’s tedious. However, some tools manage that too. I don’t remember which one, off hand.

      Thanks again for your friendly way of explaining things, much appreciated.

      Glad I can help! Take your time - there are a lot of tools to explore, unless you’re on a mission. Good luck!