>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
`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.
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
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.
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).
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
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)
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)
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
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)
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
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.
>using Python on a Nix machine
You shouldn't do that lol. But if you want it anyways: https://wiki.nixos.org/wiki/Python
>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
use nixenv
`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.
>You shouldn't do that lol
Of course
Black person, python is probably the worst programming to grace this gay earth... okay, second worst, forgot php exists
>Verification not required.
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
Post legs, gay
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.
?????
This isn't a good idea.
If poogeets can't copy/paste it goes in the trash for them.
nix-shell -p python3 python3Packages.numpy [etc] --run ./script.py
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.
Why is that incorrect?
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.
I'm not typing the nix shell version
lmao
literally a special snowflake OS
can't make this shit up!
Nixsisters, I thought nix had the biggest repository that btfo aur? How come some python script can't run?
Because python package management is fake and gay
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).
arch shills BTFO
>arch shills BTFO
Don't feed them.
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
Can’t you just use something like distrobox and run it from a contained distro?
Why the frick would I even use this piece of shit then?
>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
there is absolutely 0 reason to not include condoms for compatibility
NixOS is an amazing solution for a problem that doesn't exist.
nah it's pretty neat but i wished they wouldnt do things in such moronic way
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)
>distrobox
holy frick i was looking for something like this without docker for ages this saves me so much trouble holy frick
sounds like a whole lot of gay shit
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 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
can Nix solve the pyenv problem?
in theory maybe
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)
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
>the Arch no-one asked for
>The post no-one asked for.
ftfy
damn wtf im sulking right now
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.