Error: PythonPipBuilder:ResolveDependencies
See original GitHub issueI’m trying to do my first sam build, following tutorial here: https://iwpnd.pw/articles/2020-01/deploy-fastapi-to-aws-lambda#
My application works with fastapi and is working well.
My template.yaml is like this:
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
fastAPI aws lambda example
Resources:
FastapiExampleLambda:
Type: AWS::Serverless::Function
Properties:
Events:
ApiEvent:
Properties:
RestApiId:
Ref: FastapiExampleGateway
Path: /{proxy+}
Method: ANY
Type: Api
FunctionName: fastapi-lambda-example
CodeUri: ./app
Handler: app.main.handler
Runtime: python3.7
Timeout: 300 # timeout of your lambda function
MemorySize: 128 # memory size of your lambda function
Description: fastAPI aws lambda example
# other options, see ->
# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy-globals.html#sam-specification-template-anatomy-globals-supported-resources-and-properties
Role: !Sub arn:aws:iam::${AWS::AccountId}:role/fast_api_lambda_role
FastapiExampleGateway:
Type: AWS::Serverless::Api
Properties:
StageName: prod
OpenApiVersion: '3.0.0'
My structure is /Project/app/app/main.py
requirements is in /Project/app template.yaml is in /Project
When I do sam build --use-container --debug after a while I got the following error:
Final incompatible: {uvloop==0.14.0(wheel), cryptography==2.8(wheel), websockets==8.1(wheel), pydantic==1.2(wheel)}
Final missing wheels: {uvloop==0.14.0(wheel)}
PythonPipBuilder:ResolveDependencies failed
Traceback (most recent call last):
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflows/python_pip/actions.py", line 42, in execute
requirements_path=self.manifest_path,
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 137, in build_dependencies
self._dependency_builder.build_site_packages(requirements_path, artifacts_dir_path, scratch_dir_path)
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 201, in build_site_packages
raise MissingDependencyError(packages_without_wheels)
aws_lambda_builders.workflows.python_pip.packager.MissingDependencyError: {uvloop==0.14.0(wheel)}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflow.py", line 269, in run
action.execute()
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflows/python_pip/actions.py", line 45, in execute
raise ActionFailedError(str(ex))
aws_lambda_builders.actions.ActionFailedError: {uvloop==0.14.0(wheel)}
Builder workflow failed
Traceback (most recent call last):
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflows/python_pip/actions.py", line 42, in execute
requirements_path=self.manifest_path,
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 137, in build_dependencies
self._dependency_builder.build_site_packages(requirements_path, artifacts_dir_path, scratch_dir_path)
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 201, in build_site_packages
raise MissingDependencyError(packages_without_wheels)
aws_lambda_builders.workflows.python_pip.packager.MissingDependencyError: {uvloop==0.14.0(wheel)}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflow.py", line 269, in run
action.execute()
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflows/python_pip/actions.py", line 45, in execute
raise ActionFailedError(str(ex))
aws_lambda_builders.actions.ActionFailedError: {uvloop==0.14.0(wheel)}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/__main__.py", line 126, in main
mode=params.get("mode", None),
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/builder.py", line 125, in build
return workflow.run()
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflow.py", line 76, in wrapper
func(self, *args, **kwargs)
File "/var/lang/lib/python3.7/site-packages/aws_lambda_builders/workflow.py", line 276, in run
raise WorkflowFailedError(workflow_name=self.NAME, action_name=action.NAME, reason=str(ex))
aws_lambda_builders.exceptions.WorkflowFailedError: PythonPipBuilder:ResolveDependencies - {uvloop==0.14.0(wheel)}
Build inside container returned response {"jsonrpc": "2.0", "id": 1, "error": {"code": 400, "message": "PythonPipBuilder:ResolveDependencies - {uvloop==0.14.0(wheel)}"}}
Build Failed
Sending Telemetry: {'metrics': [{'commandRun': {'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam build', 'duration': 121098, 'exitReason': 'BuildError', 'exitCode': 1, 'requestId': 'f020dd4f-0ab2-4d35-bb27-50136d7190d9', 'installationId': 'acc6ee82-60bf-4a06-a81c-405c230a0da1', 'sessionId': 'ed7fd895-e84e-4088-81c8-29386e6a31bf', 'executionEnvironment': 'CLI', 'pyversion': '3.7.6', 'samcliVersion': '0.41.0'}}]}
HTTPSConnectionPool(host='aws-serverless-tools-telemetry.us-west-2.amazonaws.com', port=443): Read timed out. (read timeout=0.1)
Error: PythonPipBuilder:ResolveDependencies - {uvloop==0.14.0(wheel)}
Do you have any idea what is wrong ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Build failed - Error: PythonPipBuilder:ResolveDependencies ...
Description Trying to create Python Lambda function from PyCharm not working Steps to reproduce Invoke Lambda creation using "Create new AWS ...
Read more >aws sam build not able to build packages which require ...
aws sam build not able to build packages which require paramiko due to "Error: PythonPipBuilder:ResolveDependencies" · Ask Question. Asked 3 ...
Read more >Error: PythonPipBuilder:ResolveDependencies - pip ... - GitLab
Summary. It seems like pip is not included in the image: python:latest. Steps to reproduce. Create a .gitlab-ci.yml file with the purposed ...
Read more >AWS SAM CLI を使用したLambdaのデプロイ
Build Failed Error: PythonPipBuilder:Validation - Binary validation ... ['Function'] Running PythonPipBuilder:ResolveDependencies Running ...
Read more >python - Bryson Tyrrell - WordPress.com
You may run into The error message “Error: PythonPipBuilder:ResolveDependencies – {pycparser==2.19(sdist)}”. This happens if you're using a ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
us too
Hello,
Yes confirmed it worked as you said
Thanks