Error: pathtools-0.1.2 not supported for interpreter python3.12

I am a little new to diagnosing nixos-rebuild errors, because I have rarely faced issues that weren’t resolved by waiting a few days (I use nixpkgs unstable).

Lately, however, when running nixos-rebuild, I receive the following, and I wonder if any of you have pointers regarding how I should begin diagnosing this. I do have python3 in both my nix config and in my home-manager config. I do not have pathtools specified as a package currently. Thank you!

error:
       … while calling the 'head' builtin

         at /nix/store/qxf6anli54ij0q1sdlnlgx9hyl658a4v-source/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'

         at /nix/store/qxf6anli54ij0q1sdlnlgx9hyl658a4v-source/lib/modules.nix:821:9:

          820|     in warnDeprecation opt //
          821|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          822|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: pathtools-0.1.2 not supported for interpreter python3.12

Kind of a dumb way to narrow this down is to methodically remove parts of your configuration until this does not occur. Use nixos-rebuild build and not switch.

1 Like

Use the --show-trace flag and paste the complete resulting error. It should give the dependency chain that led to this.

But also, the only reverse dependency of pathtools is wandb, which in turn gets used by optuna, k-diffusion, spacy-loggers, dalle-mini, fs-chat, torchrl.

3 Likes

Nice! --show-trace worked perfectly and showed me what I needed to see. I had llama-index-core that required spacy that required spacy-loggers. I just removed llama-index for now, and will likely just bring it in per-project going forward, rather than system-wide. Much appreciated!

I encountered a similar problem and used home-manager --show-trace switch (home-manager passes option --show-trace directly to nix-build) to identify the package dependency path frogmouth, python3.12-textual-0.72.0, python3.12-tree-sitter-languages-1.10.2, and tree-sitter0_21-0.21.3 which revealed an incompatibility between tree-sitter0_21-0.21.3 and python3.12:

.
.
.
… while evaluating derivation 'frogmouth-0.9.1'
         whose name attribute is located at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/pkgs/stdenv/generic/make-derivation.nix:334:7

       … while evaluating attribute 'propagatedBuildInputs' of derivation 'frogmouth-0.9.1'
         at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/pkgs/stdenv/generic/make-derivation.nix:388:7:
          387|       depsHostHostPropagated      = elemAt (elemAt propagatedDependencies 1) 0;
          388|       propagatedBuildInputs       = elemAt (elemAt propagatedDependencies 1) 1;
             |       ^
          389|       depsTargetTargetPropagated  = elemAt (elemAt propagatedDependencies 2) 0;

       … while evaluating the attribute 'out.outPath'
         at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/lib/customisation.nix:352:13:
          351|             drvPath = assert condition; drv.${outputName}.drvPath;
          352|             outPath = assert condition; drv.${outputName}.outPath;
             |             ^
          353|           } //

       … while evaluating the attribute 'out.outPath'
         at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/lib/customisation.nix:352:13:
          351|             drvPath = assert condition; drv.${outputName}.drvPath;
          352|             outPath = assert condition; drv.${outputName}.outPath;
             |             ^
          353|           } //

       … while calling the 'getAttr' builtin
         at <nix/derivation-internal.nix>:19:19:
           18|       value = commonAttrs // {
           19|         outPath = builtins.getAttr outputName strict;
             |                   ^
           20|         drvPath = strict.drvPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:9:12:
            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'python3.12-textual-0.72.0'
         whose name attribute is located at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/pkgs/stdenv/generic/make-derivation.nix:334:7

       … while evaluating attribute 'nativeBuildInputs' of derivation 'python3.12-textual-0.72.0'
         at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/pkgs/stdenv/generic/make-derivation.nix:378:7:
          377|       depsBuildBuild              = elemAt (elemAt dependencies 0) 0;
          378|       nativeBuildInputs           = elemAt (elemAt dependencies 0) 1;
             |       ^
          379|       depsBuildTarget             = elemAt (elemAt dependencies 0) 2;

       … while evaluating the attribute 'out.outPath'
         at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/lib/customisation.nix:352:13:
          351|             drvPath = assert condition; drv.${outputName}.drvPath;
          352|             outPath = assert condition; drv.${outputName}.outPath;
             |             ^
          353|           } //

       … while calling the 'getAttr' builtin
         at <nix/derivation-internal.nix>:19:19:
           18|       value = commonAttrs // {
           19|         outPath = builtins.getAttr outputName strict;
             |                   ^
           20|         drvPath = strict.drvPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:9:12:
            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'python3.12-tree-sitter-languages-1.10.2'
         whose name attribute is located at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/pkgs/stdenv/generic/make-derivation.nix:334:7

       … while evaluating attribute 'propagatedBuildInputs' of derivation 'python3.12-tree-sitter-languages-1.10.2'
         at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/pkgs/stdenv/generic/make-derivation.nix:388:7:
          387|       depsHostHostPropagated      = elemAt (elemAt propagatedDependencies 1) 0;
          388|       propagatedBuildInputs       = elemAt (elemAt propagatedDependencies 1) 1;
             |       ^
          389|       depsTargetTargetPropagated  = elemAt (elemAt propagatedDependencies 2) 0;

       … in the condition of the assert statement
         at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/lib/customisation.nix:352:23:
          351|             drvPath = assert condition; drv.${outputName}.drvPath;
          352|             outPath = assert condition; drv.${outputName}.outPath;
             |                       ^
          353|           } //

       … in the right operand of the IMPL (->) operator
         at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/pkgs/development/interpreters/python/mk-python-derivation.nix:350:13:
          349| in extendDerivation
          350|   (disabled -> throw "${name} not supported for interpreter ${python.executable}")
             |             ^
          351|   passthru

       … while calling the 'throw' builtin
         at /nix/store/7v6l2v247fmdgfpbs3w91mf6rinai4yk-source/pkgs/development/interpreters/python/mk-python-derivation.nix:350:16:
          349| in extendDerivation
          350|   (disabled -> throw "${name} not supported for interpreter ${python.executable}")
             |                ^
          351|   passthru

       error: tree-sitter0_21-0.21.3 not supported for interpreter python3.12

In order to bypass this error, I removed package frogmouth which completely eliminated this bad dependency path from my Nix environment.