How the frick do I run a python script on this piece of shit?

How the frick do I run a python script on this piece of shit?

Mike Stoklasa's Worst Fan Shirt $21.68

Shopping Cart Returner Shirt $21.68

Mike Stoklasa's Worst Fan Shirt $21.68

  1. 3 weeks ago
    Anonymous

    >using Python on a Nix machine
    You shouldn't do that lol. But if you want it anyways: https://wiki.nixos.org/wiki/Python

    • 3 weeks ago
      Anonymous

      >You shouldn't do that lol.
      why
      >https://wiki.nixos.org/wiki/Python
      im trying to understand pip2nix and i've tried venvs but i dont think i understand how they work

      • 3 weeks ago
        Anonymous

        use nixenv

        • 3 weeks ago
          Anonymous

          `nix-env` is gay, don't use it. If you're really too lazy for `nix-shell`/`nix shell` with listed dependencies or a proper package, then just use distrobox as an escape hatch for this script.

    • 3 weeks ago
      Anonymous

      >You shouldn't do that lol
      Of course

      • 3 weeks ago
        Anonymous

        Black person, python is probably the worst programming to grace this gay earth... okay, second worst, forgot php exists

        >Verification not required.

        • 3 weeks ago
          Anonymous

          No, the of course given here was for the typical loonixtard accusing the user doing X and telling them to just don't do it instead of it being the OS's fault for not giving users a seamless experience to run something trivial... in this case it's fricking python scripts lmao

    • 3 weeks ago
      Anonymous

      Post legs, gay

    • 3 weeks ago
      Anonymous

      Here's my flake for a python development environment template:

      {
      description = "Python Development Environment template";

      inputs = {
      nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
      };

      outputs = {
      self,
      nixpkgs,
      ...
      } @ inputs: let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
      in {
      devShells.x86_64-linux.default =
      pkgs.mkShell
      {
      nativeBuildInputs = with pkgs; [
      (python3.withPackages (ps:
      with ps;
      with python3Packages; [
      jupyter
      ipython
      pandas
      numpy
      matplotlib
      seaborn
      ]))
      ];
      };
      };
      }

      > You shouldn't do that lol.
      ?????

      use nixenv

      This isn't a good idea.

      • 3 weeks ago
        Anonymous

        If poogeets can't copy/paste it goes in the trash for them.

  2. 3 weeks ago
    Anonymous

    nix-shell -p python3 python3Packages.numpy [etc] --run ./script.py

    • 3 weeks ago
      Anonymous

      The correct way to do it is with a flake, but it gets tricky if your imports are not in nixpkgs.
      The incorrect way to do it is with a flake that makes pip work.
      This is worse than the incorrect way to do it.

      You can do it both ways, but you should very much prefer the correct route.

      • 3 weeks ago
        Anonymous

        Why is that incorrect?

        • 3 weeks ago
          Anonymous

          Flakes are meant to be reproducible. If you use a flake to make pip work, you break reproducibility, so you might as well not use a flake.

      • 3 weeks ago
        Anonymous

        I'm not typing the nix shell version

      • 3 weeks ago
        Anonymous

        lmao
        literally a special snowflake OS
        can't make this shit up!

  3. 3 weeks ago
    Anonymous

    Nixsisters, I thought nix had the biggest repository that btfo aur? How come some python script can't run?

    • 3 weeks ago
      Anonymous

      Because python package management is fake and gay

  4. 3 weeks ago
    Anonymous

    Write proper requirements/pyproject/whatever file for it and use something like dream2nix python support (https://github.com/nix-community/dream2nix/tree/main/examples/packages/languages/python-local-development) or poetry2nix (https://github.com/nix-community/poetry2nix/tree/master/templates/app).

  5. 3 weeks ago
    Anonymous

    arch shills BTFO

    • 3 weeks ago
      Anonymous

      >arch shills BTFO
      Don't feed them.

  6. 3 weeks ago
    Anonymous

    you can't. you first need to know 3 different languages, home manager and be a systemd expert. sorry you didnt read that hash219381894w142141 is not possible for hash20939013901

  7. 3 weeks ago
    Anonymous

    Can’t you just use something like distrobox and run it from a contained distro?

    • 3 weeks ago
      Anonymous

      Why the frick would I even use this piece of shit then?

      • 3 weeks ago
        Anonymous

        No, the of course given here was for the typical loonixtard accusing the user doing X and telling them to just don't do it instead of it being the OS's fault for not giving users a seamless experience to run something trivial... in this case it's fricking python scripts lmao

        >why is this declarative and reproducible operating system expecting me to do things in a declarative and reproducible manner
        Stop being moronic, don't use it if it doesn't suit your use case. Simple as that.
        Also this

        Write proper requirements/pyproject/whatever file for it and use something like dream2nix python support (https://github.com/nix-community/dream2nix/tree/main/examples/packages/languages/python-local-development) or poetry2nix (https://github.com/nix-community/poetry2nix/tree/master/templates/app).

        [...]
        my dear melaninpositive friends, "doing things in such a moronic way" is the point of nixos – you trade some of the ease of being able to "just run python scripts lmao" for having your system configuration as a code you can build reproducibly and upgrade/rollback easily. yes it's a bit annoying for things that expect you to just wing it by having random shit lying around your filesystem, but it's a trade-off you make for those features (and in worst case you have `buildFHSEnv` and distrobox)

        • 3 weeks ago
          Anonymous

          there is absolutely 0 reason to not include condoms for compatibility

  8. 3 weeks ago
    Anonymous

    NixOS is an amazing solution for a problem that doesn't exist.

    • 3 weeks ago
      Anonymous

      nah it's pretty neat but i wished they wouldnt do things in such moronic way

      • 3 weeks ago
        Anonymous

        No, the of course given here was for the typical loonixtard accusing the user doing X and telling them to just don't do it instead of it being the OS's fault for not giving users a seamless experience to run something trivial... in this case it's fricking python scripts lmao

        my dear melaninpositive friends, "doing things in such a moronic way" is the point of nixos – you trade some of the ease of being able to "just run python scripts lmao" for having your system configuration as a code you can build reproducibly and upgrade/rollback easily. yes it's a bit annoying for things that expect you to just wing it by having random shit lying around your filesystem, but it's a trade-off you make for those features (and in worst case you have `buildFHSEnv` and distrobox)

        • 3 weeks ago
          Anonymous

          >distrobox
          holy frick i was looking for something like this without docker for ages this saves me so much trouble holy frick

        • 3 weeks ago
          Anonymous

          sounds like a whole lot of gay shit

          • 3 weeks ago
            Anonymous

            if you don't need the things it gives you, then yeah - it's just pain for no gain. For me the pain is worth it because I can manage multiple machines in my homelab (and services on them) from one git repo with nix configs (including things that were otherwise a pain to get working like Brother driver of VFIO - the latter fricked up my Arch when I tried to revert it and it was my trigger to move all to nixos; I have since experimented with my machines way more and never was further than a generation rollback from unfricking things).

            there is absolutely 0 reason to not include condoms for compatibility

            There absolutely is, because it makes your system less reproducible. But there are various things you can try if you're moronic and insist on making nixos something it's not supposed to be:
            https://github.com/balsoft/nixos-fhs-compat
            https://github.com/Mic92/nix-ld
            https://github.com/thiagokokada/nix-alien
            https://github.com/GermanBread/nixos-fhs

  9. 3 weeks ago
    Anonymous

    can Nix solve the pyenv problem?

    • 3 weeks ago
      Anonymous

      in theory maybe

    • 3 weeks ago
      Anonymous

      It works well for things that are proper packages. It's more annoying if the app does weird shit with it's dependencies, but I'm using the SD gui via https://github.com/virchau13/automatic1111-webui-nix and it mostly werks (just have to ensure I use the same nixpkgs commit for SD gui and the system, because otherwise nVidia complains about binary compatibility)

  10. 3 weeks ago
    Anonymous

    I don't remember how I did but I wanted to coom really hard and needed to get cyberdrop to work, i was super frustrated while reading the wiki and edging myself.
    Ended up solving it pretty fast tbh sorry I can't help more just git gud i guess

  11. 3 weeks ago
    Anonymous

    >the Arch no-one asked for

    • 3 weeks ago
      Anonymous

      >The post no-one asked for.
      ftfy

      • 3 weeks ago
        Anonymous

        damn wtf im sulking right now

        • 3 weeks ago
          Anonymous

          You should be because you are just arch troll. When are ready to move on to learn actual computing, not harvesting wikis, which is very hard with very little help. Nix is waiting. If not, you can always install gentoo.

Your email address will not be published. Required fields are marked *