question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ResolutionImpossible: kappa==0.6.0 on pkgs.python36

See original GitHub issue
let
  mach-nix-src-boot = builtins.fetchGit {
    url = "https://github.com/DavHau/mach-nix/";
    ref = "refs/tags/2.3.0";
  };
  mach-nix-boot = import mach-nix-src-boot;
  pkgs-boot = mach-nix-boot.nixpkgs;
  mach-nix-src = let
    src = mach-nix-src-boot;
    patches = [
      (builtins.toFile "mach-nix-dump.patch" ''
--- a/mach_nix/generate.py
+++ b/mach_nix/generate.py
@@ -1,6 +1,7 @@
 import json
 import os
 import sys
+import traceback
 from os.path import dirname
 from pprint import pformat
 from typing import List
@@ -88,6 +89,7 @@ def handle_resolution_impossible(exc: ResolutionImpossible, reqs_str, providers_
         f"The requirements which caused the error:"
         f"{causes_str}\n",
         file=sys.stderr)
+    traceback.print_exc(file=sys.stderr)
 
 
 if __name__ == "__main__":
      '')
    ];
  in if patches == [ ] then src else pkgs-boot.applyPatches {
    name = "match-nix-src-patched";
    inherit src patches;
  };
  mach-nix = import mach-nix-src;
  pkgs = mach-nix.nixpkgs;
  machNixFile-src = "${mach-nix-src}/mach_nix/nix/mach.nix";
  machNixFile = import machNixFile-src;
in machNixFile {
  python = pkgs.python36; # failure
  # python = pkgs.python37; # success
  requirements = ''
    kappa==0.6.0
  '';
}
bb010g ~/.../python/example-nixpkgs-dev-env % nix-build --show-trace -k mach-nix-mwe.nix
these derivations will be built:
  /nix/store/s2dcbcbfgbqyfps1lh920br4ih5qnzy0-mach_nix_file.drv
building '/nix/store/s2dcbcbfgbqyfps1lh920br4ih5qnzy0-mach_nix_file.drv'...

Some requirements could not be resolved.
Top level requirements:
  kappa==0.6.0
Providers:
  {'_default': 'wheel,sdist,nixpkgs',
   'gdal': 'nixpkgs',
   'pip': 'nixpkgs',
   'setupmeta': 'wheel',
   'setuptools': 'nixpkgs',
   'wheel': 'nixpkgs,sdist'}
Mach-nix version: 2.3.0
Python: 3.6.11
Cause: Requirements conflict: Requirement.parse('kappa==0.6.0')
The requirements which caused the error:
  kappa==0.6.0

Traceback (most recent call last):
  File "/nix/store/h7sh37qqjhyw7bp55csg88yic3ymvk82-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 185, in
 _merge_into_criterion
    crit = self.state.criteria[name]
KeyError: 'kappa'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/h7sh37qqjhyw7bp55csg88yic3ymvk82-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 280, in
 resolve
    name, crit = self._merge_into_criterion(r, parent=None)
  File "/nix/store/h7sh37qqjhyw7bp55csg88yic3ymvk82-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 187, in
 _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/nix/store/h7sh37qqjhyw7bp55csg88yic3ymvk82-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 87, in
from_requirement
    raise RequirementsConflicted(criterion)
resolvelib.resolvers.RequirementsConflicted: Requirements conflict: Requirement.parse('kappa==0.6.0')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/5daxyvrpm6b3l3s8ag1cf9wysifzaciw-yky9dfn076mgcc359aaj46b7vz0i3xv7-match-nix-src-patched/mach_nix/generate.py", line 6
4, in main
    expr = generator.generate(reqs)
  File "/nix/store/5daxyvrpm6b3l3s8ag1cf9wysifzaciw-yky9dfn076mgcc359aaj46b7vz0i3xv7-match-nix-src-patched/mach_nix/generators/overides_
generator.py", line 34, in generate
    pkgs = self.resolver.resolve(reqs)
  File "/nix/store/5daxyvrpm6b3l3s8ag1cf9wysifzaciw-yky9dfn076mgcc359aaj46b7vz0i3xv7-match-nix-src-patched/mach_nix/resolver/resolvelib_
resolver.py", line 63, in resolve
    result = resolvelib.Resolver(Provider(self.nixpkgs, self.deps_provider), reporter).resolve(reqs, max_rounds=1000)
  File "/nix/store/h7sh37qqjhyw7bp55csg88yic3ymvk82-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 413, in
 resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/nix/store/h7sh37qqjhyw7bp55csg88yic3ymvk82-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 282, in
 resolve
    raise ResolutionImpossible(e.criterion.information)
resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=Requirement.parse('kappa==0.6.0'), parent=None)]
builder for '/nix/store/s2dcbcbfgbqyfps1lh920br4ih5qnzy0-mach_nix_file.drv' failed with exit code 1
error: build of '/nix/store/s2dcbcbfgbqyfps1lh920br4ih5qnzy0-mach_nix_file.drv' failed
(100) bb010g ~/.../python/example-nixpkgs-dev-env %

Chasing stacktraces around hasn’t really gone anywhere. If you let the requirement float (kappa), kappa==0.3.1 is picked. A requirement of kappa>0.3.1 fails.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
DavHaucommented, Oct 3, 2020

With this fix and a few other improvements I just added, you can build kappa now like this:

let
  mach-nix = import (builtins.fetchGit {
    url = "https://github.com/DavHau/mach-nix/";
    rev = "469891f8d0959aa97b3a0e3566a70488caeac499";
  });
  kappa = mach-nix.buildPythonPackage (mach-nix.fetchPypiSdist "kappa" "0.6.0");
in
kappa
0reactions
DavHaucommented, Oct 3, 2020

I added the missing variable to the crawler and deleted ~ 188K DB entries which had the same error. It might take a few days for the crawler to re-crawl those releases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ResolutionImpossible error message #8377 - pypa/pip - GitHub
When a user tries to install a combination of packages, due to conflicting dependencies, pip is unable to complete the install. With the...
Read more >
How to solve `ResolutionImpossible` error in python when ...
I am getting this error when using pip to install from a requirements file. C:\Users\keerthi\AppData\Local\Programs\Python\Python36\healthcare\ ...
Read more >
how to solve Resolution impossible error in pyt...anycodings
how to solve Resolution impossible error in python while downloading packages C:\Users\keerthi\AppData\Local\Programs ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found