this post was submitted on 26 Jul 2026
226 points (89.8% liked)

linuxmemes

32248 readers
136 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry of any kind will not be tolerated. This is an LGBTQ+-friendly community -- if that is a problem for you, you should leave.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don't come looking for advice, this is not the right community.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves / tolerates / hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 3 years ago
    MODERATORS
     

    I use Arch btw

    you are viewing a single comment's thread
    view the rest of the comments
    [–] ImgurRefugee114@reddthat.com 15 points 3 days ago (1 children)

    It's usually pretty straight forward to get python things to work once you know how, but yeah, you can still hit edgecases with poorly structured dependencies. Even in simple cases, having to package things as an end user can be a tough barrier. Personally, I find the pain to be well worth what nix offers me, but I know that it's just not a good fit for the vast majority of people.

    [–] clay_pidgin@sh.itjust.works 2 points 3 days ago* (last edited 3 days ago) (2 children)

    Is it? Every time nixpkgs changes the python minor version all of my virtualenvs break, which is a pain. I guess I need to look into dev shell or something.

    [–] ImgurRefugee114@reddthat.com 8 points 3 days ago* (last edited 3 days ago) (1 children)

    Yes you need to use a shell to make it reproducible in the nix sense; a regular venv will try to point to the nix store or lose libraries (or try to dynamic-link stuff) when your system env changes which is why you need it to be independent of it.

    I don't bother with venvs in my own projects because nix kind of subsumes its purpose, but it's possible to work with them still.

    Something that might help: devenv. I haven't used this personally but the UX looks like an upgrade. (I just use flakes with dev shells defined inline long-form)

    This video came across my feed last night, and might give you a rough idea: https://youtu.be/jldArhyi6jM&t=581

    [–] clay_pidgin@sh.itjust.works 1 points 1 day ago (2 children)

    If you don't use a venv at all, do you add every new requirement to your main config.nix?

    If it matters, I'm not a real developer. I don't deploy or package anything. I'm just making tools for my own work. I'm not concerned about Nix-like reproducibility for my python scripts because they're pretty simple and only live on my machine.

    [–] trem@lemmy.blahaj.zone 2 points 17 hours ago

    In 'proper' software development projects, you (ideally) want all information checked into the repo for what is needed to run the software:

    • which dependencies you need,
    • what particular versions of the dependencies,
    • as well as which runtime/compiler version to use.

    And then you'd use a package manager which can automatically install all these.
    Python projects are currently heavily moving towards uv for this. Traditionally, you'd use pip + virtualenv + sometimes pipx for this.

    Using nix develop with flakes is also valid for this, if your team agrees on it: https://nixos.wiki/wiki/Development_environment_with_nix-shell#nix_develop

    Whichever way you solve it, the idea is that:

    1. You can check out a commit from months ago and just run it right away. Well, or just a commit from yesterday, which is on a different Git branch, where you haven't yet started your big dependency upgrade. As soon as upgrading a dependency requires changes in your code, you want the dependency version change tracked together with the respective code change.
    2. Your different team mates can all work on the repository, even though one of them might be on Debian, the next on Arch and the third is on macOS. By defining all your dependencies in the repo, you can avoid "works on my machine" scenarios, where a bug occurs on one PC, but not on the dev's PC where you try to reproduce it.
    [–] ImgurRefugee114@reddthat.com 3 points 1 day ago

    No, not to my nixos configuration. In fact I don't even have a global / system / user-wide Python interpreter. I rely on nix shells and package closures; no imperative use of python.

    I'm not a big python dev; my meaningful experience is with systems languages. But for a release or project i intend to be consumed outside of nix, I'll use venvs and a requirements file because that's just the right way to do things.

    But what I meant was that I'd use a nix shell or build package that uses py libs that are already packaged for nix, or package the ones that aren't myself, and just use the nix closure as my venv; no regular venv or pip workflow.

    Devenv seems to let you just point at a requirements file and it builds the venv for you. Very clean for portability beyond nix consumers that way. But most of my Python projects are personal utilities and can target nix exclusively.

    [–] urushitan@kakera.kintsugi.moe 3 points 2 days ago* (last edited 2 days ago) (1 children)

    For most dev libraries I use

    https://github.com/nix-community/home-manager

    Which manages

    https://github.com/jdx/mise

    Which manages uv and pyenv and stuff for python, and package managers for just about every other language I dev in.

    It’s version managers all the way down lol, but it’s the only way I’ve found to have proper declarative versions within my nix config that don’t rely on the nixpkgs ecosystem changing, and doesn’t require manually managing a package manager for every single language I use

    [–] clay_pidgin@sh.itjust.works 1 points 1 day ago

    I use home-manager too, but maybe I'm not leveraging it enough since I'm the only user. I'll look at Mise, thanks.