I need Python with Virtual Environments and followed Python - Python virtual environment to do so. However, nix-shell
gives me this error:
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'pipzone-shell-env'
whose name attribute is located at /nix/store/d3qda808yhlkqwaffvq34i4ks2c5lmxc-nixos-23.11/nixos/pkgs/stdenv/generic/make-derivation.nix:348:7
… while evaluating attribute 'shellHook' of derivation 'pipzone-shell-env'
at /nix/store/d3qda808yhlkqwaffvq34i4ks2c5lmxc-nixos-23.11/nixos/pkgs/build-support/build-fhsenv-bubblewrap/default.nix:231:7:
230| env = runCommandLocal "${name}-shell-env" {
231| shellHook = bwrapCmd {};
| ^
232| } ''
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'cudatoolkit_11' missing
at /home/erti/PROJECT_repos/xxx/shell.nix:8:5:
7| python39Packages.virtualenv
8| cudaPackages.cudatoolkit_11
| ^
9| ]);
[erti@nixos:~/PROJECT_repos/oxxx]$ nix-shel shell.nix
nix-shel: command not found
[erti@nixos:~/PROJECT_repos/xxx]$ nix-shell shell.nix
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'pipzone-shell-env'
whose name attribute is located at /nix/store/d3qda808yhlkqwaffvq34i4ks2c5lmxc-nixos-23.11/nixos/pkgs/stdenv/generic/make-derivation.nix:348:7
… while evaluating attribute 'shellHook' of derivation 'pipzone-shell-env'
at /nix/store/d3qda808yhlkqwaffvq34i4ks2c5lmxc-nixos-23.11/nixos/pkgs/build-support/build-fhsenv-bubblewrap/default.nix:231:7:
230| env = runCommandLocal "${name}-shell-env" {
231| shellHook = bwrapCmd {};
| ^
232| } ''
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'cudatoolkit_11' missing
at /home/erti/PROJECT_repos/xxx/shell.nix:8:5:
7| python39Packages.virtualenv
8| cudaPackages.cudatoolkit_11
| ^
9| ]);
My shell.nix is exactly as explained on nixos.wiki (https://nixos.wiki/wiki/Python)
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "pipzone";
targetPkgs = pkgs: (with pkgs; [
python39
python39Packages.pip
python39Packages.virtualenv
cudaPackages.cudatoolkit_11
]);
runScript = "bash";
}).env
Can anyone help me? What did i miss?