I have noticed that rycee’s home-manager does not set PYTHONPATH when adding pkgs.python3.withPackages to the program list while nix-shell does it properly.
How can I get the PYTHONPATH such as the one built by nix-shell in order to set it as an environment variable manually in my home.nix ?
For instance if I evaluate:
let pkgs = import <nixpkgs> {}; in pkgs.python3.withPackages (pp: with pp; [ pytorchWithCuda ])
is there an attribute to that set that can help me retrieve the python env librairies?
I could then build the PYTHONPATH with lib.makeSearchPath.
From
I can guess that it should be held in an extraLibs attribute, but using nix repl I can’t seem to find it.
I know, but it’s a request from one of my users.
For more context, NixOS is the only OS on which I could successfully install NVIDIA, CUDA and PyTorch with CUDA support on my server (tried Ubuntu and Manjaro). Yet another testimony in favor of it haha.
with pkgs.python3.pkgs; [ pytorchWithCuda ]
the shellhook on the python packages will execute in the shell
I’ve tried it but it seems that the shell hook is not executed on login if it’s set up from home-manager.