Pythonpipbuilder: resolve dependencies - list index out of range
Asked Answered
B

2

5

Description: I am trying to use sam build with the following requirements but its throwing the error: Pythonpipbuilder: resolve dependencies - list index out of range

  • pyotp
  • ulid-py
  • aws_encryption_sdk
  • boto3
  • requests
  • attrs
  • cryptography

Steps to reproduce the issue:

  1. Create a virtual env.
  2. Activate virtual env in a terminal
  3. pip install -r requirements.txt
  4. sam build

Observed result: Build Failed Error: PythonPipBuilder:ResolveDependencies - list index out of range

Expected result: Build Succeeded

Additional environment details Amazon Linux 2 Workspace Python3.8

Brashear answered 6/4, 2021 at 15:33 Comment(0)
B
7

If you encounter this problem you have to use sam build --use-container in other to go around the problem with the requirements.txt Its a well known issue and a GitHub issue has been submitted https://github.com/aws/aws-lambda-builders/issues/229#issuecomment-841407255

Brashear answered 19/5, 2021 at 15:10 Comment(0)
P
0

I had the same failure when my serverless application specified Runtime as python3.6, while the environment was using Python3.7.

Plessor answered 3/5, 2021 at 19:35 Comment(1)
thank you for your answers, it seems to be a well known issue with some dependencies and it requires the user to use sam build --use-containerBrashear

© 2022 - 2024 — McMap. All rights reserved.