Closed
Description
Here's a minimal buildspec.yml
which fails without installing anything running on aws/codebuild/standard:4.0
(CodeBuild Image):
---
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
commands:
- python -m pip freeze
- python -m pip check
Partial build log
(…)
[Container] 2020/08/07 00:00:00 Running command python -m pip freeze
(…)
aws-sam-cli==0.52.0
(…)
boto3==1.14.1
(…)
[Container] 2020/08/07 00:00:00 Running command python -m pip check
aws-sam-cli 0.52.0 has requirement boto3>=1.13.0,~=1.13.0, but you have boto3 1.14.1.
[Container] 2020/08/07 00:00:00 Command did not exit successfully python -m pip check exit status 1
[Container] 2020/08/07 00:00:00 Phase complete: INSTALL State: FAILED
[Container] 2020/08/07 00:00:00 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: python -m pip check. Reason: exit status 1
Possible solutions:
-
Use full pinning
pip and PyYAML are already pinned. Maybe pin everything (including dependencies of dependencies) by using pip-compile. See eg. feat: Allow pinned requirements for linux installs from source aws-sam-cli#1917
-
Use pip's new dependency resolver.
See eg. https://blog.python.org/2020/07/upgrade-pip-20-2-changes-20-3.html and pip needs a dependency resolver pypa/pip#988 (comment)
Metadata
Metadata
Assignees
Labels
No labels