Virtuelle Umgebung von Python in Nixos (siehe Flake am Ende der Frage)
Wenn ich welches Python in meiner virtuellen Umgebung in Nixos ausführe, erhalte ich:
/nix/store/24W9CKMKQ0ASAIF83C13Z53YRAQ584LM-PYTHON3-3.14 .0a4/bin/python
Ich habe versucht, diesen Pfad als mein Interpreter in VS -Code auszuwählen, indem ich ihn an das Windows WSL -Pfadformat anpasst: < /p>
\WSL.LocalHost\Nixos\Nix\Store\24w9cKmkq0asaif83c13z53yraq584LM-Python3-3.14.0a4\ Bin\python< >
Mit dem VS -Code können ich nur ausführbare Dateien ausführbaren (.exe) auswählen. Dies ist sinnvoll, da die ausführbare Linux -Datei nicht direkt von Windows aus ausgeführt werden kann. Wenn ja, wie kann ich das tun? Jede Anleitung, wie man dies richtig eingerichtet hat, wäre sehr geschätzt. Es soll das Problem reproduzierbar machen: < /p>
Code: Select all
{
description = "Python and Manim development environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
python314
manim
];
shellHook = ''
echo "Development environment for Python and Manim"
echo "Run 'python' to start Python interpreter"
echo "Run 'manim' to start Manim"
'';
};
}
);
}