on-nix / python

Extensive collection of Python projects from PyPI, for Nix!
https://python.on-nix.com
The Unlicense
120 stars 46 forks source link

NixOS 21.11: attribute 'python36' missing #25

Closed fleimgruber closed 2 years ago

fleimgruber commented 2 years ago

Just upgraded to NixOS 21.11 using the default.nix:

let
  nixpkgs = import <nixpkgs> { };
  pythonOnNix = import (builtins.fetchGit {
    ref = "main";
    rev = "8afcf754a19b59200f3b3e006e90d4a297e08a7e";
    url = "https://github.com/on-nix/python";
  })
  { 
  inherit nixpkgs;
  };

  env = pythonOnNix.python39Env {
    name = "lg";
    projects = {
      numpy = "latest";
      pandas = "latest";
      jupyter-core = "latest";
      plotly = "latest";
      ipython = "latest";
      ipykernel = "latest";
      scipy = "latest";
      kaleido = "latest";
      sympy = "latest";
    };
  };
in
nixpkgs.stdenv.mkDerivation {
  buildInputs = [ env ];
  builder = builtins.toFile "builder.sh" ''
    source $stdenv/setup

    set -x

    python --version
    python -c 'import numpy; print(numpy.__version__)'
    python -c 'import pandas; print(pandas.__version__)'
    python -c 'import jupyter; print(jupyter.__version__)'
    python -c 'import plotly; print(plotly.__version__)'
    python -c 'import IPython; print(IPython.__version__)'
    python -c 'import ipykernel; print(ipykernel.__version__)'
    python -c 'import kaleido; print(kaleido.__version__)'
    python -c 'import sympy; print(sympy.__version__)'

    touch $out

    set +x
  '';
  name = "lg";
}

fails with:

direnv: loading ~/lg/.envrc
trace: 

$ You are using Python on Nix!

  https://github.com/on-nix/python

  Found a bug? Are we missing a feature?
  Let us know in the issues section.

  Please consider starring or contributing to the project!

error: while evaluating the attribute 'buildInputs' of the derivation 'lg' at /nix/store/yprzv1vy3chn6d3g6apfm39v0r6k57dy-nixos-21.11.334934.8a053bc2255/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:
while evaluating the attribute 'envDev' of the derivation 'lg-dev' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:90:3:
while evaluating the attribute '__envTemplate' of the derivation 'make-template-for-make-search-paths' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:90:3:
while evaluating anonymous function at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:27:9, called from undefined position:
while evaluating anonymous function at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/as-content/default.nix:1:1, called from /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-template/default.nix:56:12:
while evaluating 'makeSource' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-search-paths/default.nix:38:16, called from undefined position:
while evaluating the attribute 'envWrapped' of the derivation 'appnope-0.1.2-python39-dev' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:90:3:
while evaluating the attribute '__envTemplate' of the derivation 'make-template-for-make-search-paths' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:90:3:
while evaluating anonymous function at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:27:9, called from undefined position:
while evaluating anonymous function at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/as-content/default.nix:1:1, called from /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-template/default.nix:56:12:
while evaluating 'generator' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-search-paths/default.nix:58:21, called from undefined position:
while evaluating 'makeExport' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-search-paths/default.nix:34:33, called from /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-search-paths/default.nix:58:29:
while evaluating the attribute '__envSearchPaths' of the derivation 'appnope-0.1.2-python39-out' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:90:3:
while evaluating the attribute '__envTemplate' of the derivation 'make-template-for-make-search-paths' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:90:3:
while evaluating anonymous function at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:27:9, called from undefined position:
while evaluating anonymous function at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/as-content/default.nix:1:1, called from /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-template/default.nix:56:12:
while evaluating 'generator' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-search-paths/default.nix:58:21, called from undefined position:
while evaluating 'makeExport' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-search-paths/default.nix:34:33, called from /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-search-paths/default.nix:58:29:
while evaluating the attribute 'envMirror' of the derivation 'pip-21.2.4-python39-out' at /nix/store/glf36a6fkrnmlia66zxmi9x7908kaz5j-source/src/args/make-derivation/default.nix:90:3:
while evaluating the attribute 'buildCommand' of the derivation 'mirror-for-pip' at /nix/store/yprzv1vy3chn6d3g6apfm39v0r6k57dy-nixos-21.11.334934.8a053bc2255/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:
while evaluating 'concatMapStrings' at /nix/store/yprzv1vy3chn6d3g6apfm39v0r6k57dy-nixos-21.11.334934.8a053bc2255/nixos/lib/strings.nix:53:25, called from /nix/store/yprzv1vy3chn6d3g6apfm39v0r6k57dy-nixos-21.11.334934.8a053bc2255/nixos/pkgs/build-support/trivial-builders.nix:418:9:
while evaluating anonymous function at /nix/store/yprzv1vy3chn6d3g6apfm39v0r6k57dy-nixos-21.11.334934.8a053bc2255/nixos/pkgs/build-support/trivial-builders.nix:418:31, called from undefined position:
while evaluating 'escapeShellArg' at /nix/store/yprzv1vy3chn6d3g6apfm39v0r6k57dy-nixos-21.11.334934.8a053bc2255/nixos/lib/strings.nix:318:20, called from /nix/store/yprzv1vy3chn6d3g6apfm39v0r6k57dy-nixos-21.11.334934.8a053bc2255/nixos/pkgs/build-support/trivial-builders.nix:420:19:
while evaluating the attribute 'urls' of the derivation 'pip-21.2.4-py3-none-any.whl' at /nix/store/yprzv1vy3chn6d3g6apfm39v0r6k57dy-nixos-21.11.334934.8a053bc2255/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:
while evaluating anonymous function at /nix/store/wjgrghgx3jhzlj8v5mxkh1n5k9s75ab6-source/default.nix:441:16, called from undefined position:
while evaluating anonymous function at /nix/store/wjgrghgx3jhzlj8v5mxkh1n5k9s75ab6-source/default.nix:427:27, called from undefined position:
while evaluating anonymous function at /nix/store/wjgrghgx3jhzlj8v5mxkh1n5k9s75ab6-source/default.nix:55:6, called from undefined position:
attribute 'python36' missing, at /nix/store/wjgrghgx3jhzlj8v5mxkh1n5k9s75ab6-source/default.nix:55:21
fleimgruber commented 2 years ago

Sorry for the noise, upgrading to rev ac7ad126d259829393f328a89b162fd0ea30fdf9 fixes that.

wellsilver commented 2 years ago

im still having this problem on repl.it and only making a new repl solves it

when I'm trying to use blank repl it happens no matter what