{
description = "virtual environment with python and streamlit";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
python=pkgs.python311;
f = ps: with ps;[
ipython
matplotlib
pandas
];
pip_python_packages= python.withPackages(f);
myDevTools = [
pip_python_packages
pkgs.streamlit
];
outputName = builtins.attrNames self.outputs self.outputs;
in {
devShells.default = pkgs.mkShell {
buildInputs = myDevTools;
};
packages.default = pkgs.poetry2nix.mkPoetryApplication {
projectDir = self;
};
apps.default = {
program = "${python}/bin/python";
args = [ "main.py" ];
src = "./.";
type = "app";
};
});
}
the command nix run "works". Not as intended, it opens only the python interpreter but this is another question.
But the command nix run doesn't work
error: … while evaluating the attribute 'pkgs.buildPythonPackage'
at /nix/store/s1z7nb9n6r5n0r34fabp6yybwkbr8mjk-source/pkgs/development/interpreters/python/passthrufun.nix:87:5: 86| withPackages = import ./with-packages.nix { inherit buildEnv pythonPackages;}; 87| pkgs = pythonPackages; | ^ 88| interpreter = "${self}/bin/${executable}"; … while calling the 'mapAttrs' builtin at /nix/store/s1z7nb9n6r5n0r34fabp6yybwkbr8mjk-source/pkgs/development/interpreters/python/passthrufun.nix:31:8: 30| value; 31| in lib.mapAttrs func items; | ^ 32| in ensurePythonModules (callPackage (stack trace truncated; use '--show-trace' to show the full trace) error: getting status of '/nix/store/ggvg85rp5qzyr9bngsl6r0pcrkyxqa49-source/poetry.lock': No
such file or directory
This error message doesn't refer to any part of my code. This is difficult to know which part causes a problem