{"record":{"id":"b4fd98ac2cf5830c","repo":"ansible/ansible","slug":"failed-to-resolve-the-requested-dependencies-map-b4fd98","errorCode":null,"errorMessage":"Failed to resolve the requested dependencies map. Got the candidate {req.fqcn!s}:{req.ver!s} ({dep_origin!s}) which didn't satisfy all of the following requirements:","messagePattern":"Failed to resolve the requested dependencies map\\. Got the candidate (.+?):(.+?) \\((.+?)\\) which didn't satisfy all of the following requirements:","errorType":"exception","errorClass":"AnsibleError","httpStatus":null,"severity":"error","filePath":"lib/ansible/galaxy/collection/__init__.py","lineNumber":1931,"sourceCode":"                'Failed to resolve the requested dependencies map. '\n                'Got the candidate {req.fqcn!s}:{req.ver!s} ({dep_origin!s}) '\n                'which didn\\'t satisfy all of the following requirements:'.\n                format(\n                    req=dep_exc.candidate,\n                    dep_origin='direct request'\n                    if not parents else 'dependency of {parent!s}'.\n                    format(parent=', '.join(parents))\n                )\n            )\n        ]\n\n        for req in dep_exc.criterion.iter_requirement():\n            error_msg_lines.append(\n                f'* {req.fqcn!s}:{req.ver!s}'\n            )\n        error_msg_lines.append(pre_release_hint)\n\n        raise AnsibleError('\\n'.join(error_msg_lines)) from dep_exc\n    except ValueError as exc:\n        raise AnsibleError(to_native(exc)) from exc\n","sourceCodeStart":1913,"sourceCodeEnd":1934,"githubUrl":"https://github.com/ansible/ansible/blob/9cf16a4aca7898481c257f1e17ad28d0b67b1f85/lib/ansible/galaxy/collection/__init__.py#L1913-L1934","documentation":"Raised on `CollectionDependencyInconsistentCandidate`: the resolver settled on a candidate for a collection, but that candidate fails one or more requirements recorded for it (enumerated as `* fqcn:ver` lines). Unlike ResolutionImpossible, one candidate exists but does not fit all parents' constraints; the message also names the parent chain that pulled it in.","triggerScenarios":"A previously chosen or pinned candidate (e.g. an already-specified version in requirements.yml, or a candidate matching another constraint) conflicts with a requirement from a different dependency chain; the message shows which parents (`dependency of X, Y`) imposed the failing requirements.","commonSituations":"Mixed old/new collections in requirements.yml, installing alongside already-installed versions, one collection pinning an exact old version of a dependency while others need newer.","solutions":["Relax or remove the exact pin on the offending collection shown as the candidate, letting the resolver pick a compatible version","Upgrade the parent collection(s) named in `dependency of ...` to versions with compatible requirement ranges","As a last resort use `--no-deps` and manage versions explicitly yourself"],"exampleFix":"# before (requirements.yml)\ncollections:\n  - name: ansible.netcommon\n    version: \"==2.0.0\"   # candidate fails cisco.iosdev's >=3 requirement\n# after\n  - name: ansible.netcommon\n    version: \">=3.0.0\"","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from ansible.errors import AnsibleError\ntry:\n    install_collections(...)\nexcept AnsibleError as e:\n    if \"didn't satisfy all of the following requirements\" in to_native(e):\n        # message lists candidate + parents; relax the pin or upgrade the parents","preventionTips":["Avoid `==` pins for collections whose deps are shared with others","Review the 'dependency of X' line to find which parent to upgrade","Validate requirements.yml in CI by running resolver against a throwaway venv"],"tags":["ansible-galaxy","dependency-resolution","version-conflict","collections"],"backgroundTag":null,"analyzedSha":"9cf16a4aca7898481c257f1e17ad28d0b67b1f85","analyzedAt":"2026-08-15T00:15:47.100Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}