-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sam build fails on Ubuntu 20.04.3 #280
Comments
Can you upgrade your sam-cli to 1.31.0 and try again? (Also upgrade your |
Yeah we get exactly the same issue unfortunately: |
I can reproduce it on macOS as well. Not reproducible with |
We will look into the issue soon.
Can you elaborate what issues with |
Can you try by adding the following before the installation:
I was unable to reproduce with: python3.8 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools wheel
pip install --upgrade aws-sam-cli
sam init --name sam-app --runtime python3.8 --dependency-manager pip --app-template hello-world
cd sam-app
echo 'pypdf4==1.27.0' > hello_world/requirements.txt
sam build You might also want to give the |
On top of what @hoffa suggested, after I ran |
Thanks guys @aahung @hoffa I'll give it a try :) |
Unfortunately no luck with upgraded setuptools and wheel :/
|
I was able to reproduce this in a personal repository with the following workflow: on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- uses: aws-actions/setup-sam@v1
- run: sam build --debug This is an interesting issue, and while I'm not yet sure what's causing it, a temporary workaround seems to be doing the following before pip install wheel
pip install pypdf4 |
@hoffa Thanks, I'll give that another try. I haven't tested with explicit install of pypdf4 yet. |
@hoffa After some more experimentation I actually found that replacing
So it seems that setup-sam@v1 resolves the issue given that there is nothing else messing around with the venv. |
Great to hear! I also realized a on: push
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install wheel
- uses: aws-actions/setup-sam@v1
- run: sam build |
SAM build command was failing.. ``` $ sam build Building function 'Function' Running PythonPipBuilder:ResolveDependencies Build Failed Error: PythonPipBuilder:ResolveDependencies - {pyyaml==6.0(wheel), cryptography==35.0.0(wheel), cffi==1.15.0(wheel)} The command "sam build" exited with 1. ``` This is due to some change with wheels[1]. We attempt to pip install wheel as a fix. [1] aws/aws-lambda-builders#280
Description:
Using sam cli 1.21.1 in github actions started to fail building wheels on Ubuntu 20.04.3. It previously worked on Ubuntu 20.04.2 but github upgraded to 20.04.3 and there is no way to go back.
Steps to reproduce:
Python 3.8.11
Run any python build using pypdf4 as a dependency using sam build on Ubuntu 20.04.3. It will fail to build the missing wheel.
--use-container will solve the issue but we do not wish to build inside container due to 500-issues against the AWS ECR.
Observed result:
Expected result:
Expect sam build to be able to build the wheel from the sdist.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 1.21Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: