Error when upgrading to nixos 21.11

Hi, I’ve been trying to upgrade to NixOS 21.11 from 21.05, but I’m having this error: ❯ sudo nixos-rebuild switch --upgrade unpacking channels...buildin - Pastebin.com
My nix-channel output:

❯ sudo nix-channel --list
nixos https://nixos.org/channels/nixos-21.11

and my installed packages:

  environment.systemPackages = with pkgs; [
    act
    acpilight
    anki
    bc
    binutils
    brightnessctl
    cryptsetup
    direnv
    docker
    docker-compose
    firefox
    gcc
    ghc
    git
    gnome3.nautilus
    gnupg1
    htop
    killall
    konsole
    nixfmt
    nixops
    nmap
    neovim
    nodejs
    mkpasswd
    okular
    pass
    pmutils
    redis
    shutter
    stdenv
    spectacle
    tdesktop
    tmux
    torsocks
    unzip
    volumeicon
    wget
    xorg.xmodmap
    zafiro-icons
  ];

Am I doing something wrong?

I’m happy to provide more information if needed :smiley:

I had this error as well and just removed nixops. I wasn’t using it anyway.

1 Like

So an error while trying to build Python 2.7 it looks like?

writing top-level names to convertdate.egg-info/top_level.txt
Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 9, in <module>
    setuptools.setup()
  File "/nix/store/21djrcwsk8h2jh45byxy49wi2bcv4ds5-python2.7-setuptools-44.0.0/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/nix/store/5nxpvrfl0p14l90rx5cjy9190ndlbbzb-python-2.7.18/lib/python2.7/distutils/core.py", line 124, in setup
    dist.parse_config_files()
  File "/nix/store/21djrcwsk8h2jh45byxy49wi2bcv4ds5-python2.7-setuptools-44.0.0/lib/python2.7/site-packages/setuptools/dist.py", line 702, in parse_config_files
    ignore_option_errors=ignore_option_errors)
  File "/nix/store/21djrcwsk8h2jh45byxy49wi2bcv4ds5-python2.7-setuptools-44.0.0/lib/python2.7/site-packages/setuptools/config.py", line 121, in parse_configuration
    meta.parse()
  File "/nix/store/21djrcwsk8h2jh45byxy49wi2bcv4ds5-python2.7-setuptools-44.0.0/lib/python2.7/site-packages/setuptools/config.py", line 426, in parse
    section_parser_method(section_options)
  File "/nix/store/21djrcwsk8h2jh45byxy49wi2bcv4ds5-python2.7-setuptools-44.0.0/lib/python2.7/site-packages/setuptools/config.py", line 399, in parse_section
    self[name] = value
  File "/nix/store/21djrcwsk8h2jh45byxy49wi2bcv4ds5-python2.7-setuptools-44.0.0/lib/python2.7/site-packages/setuptools/config.py", line 184, in __setitem__
    value = parser(value)
  File "/nix/store/21djrcwsk8h2jh45byxy49wi2bcv4ds5-python2.7-setuptools-44.0.0/lib/python2.7/site-packages/setuptools/config.py", line 515, in _parse_version
    version = self._parse_attr(value, self.package_dir)
  File "/nix/store/21djrcwsk8h2jh45byxy49wi2bcv4ds5-python2.7-setuptools-44.0.0/lib/python2.7/site-packages/setuptools/config.py", line 350, in _parse_attr
    value = getattr(module, attr_name)
AttributeError: 'module' object has no attribute '__version__'

(…)

builder for '/nix/store/3iwy0v935l5g8q8ggw6sgravncsjlq69-python2.7-flake8-4.0.1.drv' failed with exit code 1
1 Like

Exactly, and as stated above, removing nixops solves it

this should be fixed in 21.11, maybe the merge or back port didn’t make it. as of now, it’s in 21.11 staging, but not 21.11 for some reason, maybe stuck in a pipe. I’m still trying to understand the magic (black) of channels, builds and the relationship between the different 21.11 branches.

Nixpkgs PR #148255 ("[Backport release-21.11] nixops: fix dependencies") progress

1 Like