ERROR REFERENCE
PythonPipBuilder:ResolveDependencies failed
sam build asked pip to resolve the function's
requirements and pip could not — a pinned version that does not
exist for the target runtime, a package needing a newer Python, or
an index the build environment cannot reach.
WHAT IT MEANS
What this error means
ERROR: Could not find a version that satisfies the requirement
... (from versions: none) is pip speaking through SAM's
builder. "From versions: none" usually means no release of that
package matches the constraint for the Python version SAM is
building against — which may be older than the one on your
laptop. Private-index packages produce the same wording when the
index is not configured in the build environment.
FIX
How to fix it
-
Reproduce with plain pip against the function runtime:
Use the same minor version as the function'spython3.12 -m pip install -r hello_world/requirements.txt --dry-runRuntime:property; that mismatch is the most common cause. - Check the pinned version exists on PyPI for that Python version — yanked releases and typos in version pins both end here.
-
For private indexes, make the index available to
the build: a
pip.conf/PIP_INDEX_URLthe builder can see, and for--use-containerbuilds, one that is reachable from inside the container. - Align local and CI Python versions so the failure reproduces where you can debug it.
AUTOMATE THE TRIAGE
Diagnose this automatically
SAM Doctor recognizes the resolver failure (high confidence) and keeps it distinct from binary-validation and runtime-mismatch failures in the same build family. Runs locally; no AWS access, no log upload.
python -m pip install sam-doctor
sam-doctor diagnose build.log --format markdown
RELATED
Related errors
- Binary validation failed for python ... constraints for runtime — the interpreter, not the packages, failing the build.
- Cannot connect to the Docker daemon — when the containerized build path is the blocker instead.