-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Error: PythonPipBuilder:ResolveDependencies - {pyodbc==4.0.27(sdist)} #1577
Comments
This is interesting, when building within the container we look for manylinux wheels. can you reproduce on a normal sam build as well? |
I tried using sam build, but sam build also failed command: sam build Build Failed |
@thanuj11 |
@jfuss, yes, It is not able to find Linux wheels for pyodbc. I will try to build manually and use it as a layer. Thanks. |
I've built pyodbc and trying to attach as lambda layer, but I always get these two errors: Thanks in advance! |
@plantusd I am not sure what's going on. Do you need to modify LD_LIBRARY_PATH env vars to point to .so files in the layer? |
I was able to get pyodbc working by using alexanderluiscampino's layer here. |
@Mike-Nahmias How did you setup your project? |
@danyags The pyodbc folder I linked to is in the root of my project and then I add it as a layer in my template:
|
@Mike-Nahmias I downloaded the file, pyodbc folder is in the root of my project, but I'm getting an error: No module named 'pyodbc'. my template.yaml file is as below AWSTemplateFormatVersion: '2010-09-09' Sample SAM Template for sam-app More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rstGlobals: Resources: HelloWorldFunction: Outputs: ServerlessRestApi is an implicit API created out of Events key under Serverless::FunctionFind out more about other implicit resources you can reference within SAMhttps://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#apiHelloWorldApi: |
@danyags I think you forgot to add the layer to your function. Sorry, I didn't make that clear. It should look something like this:
|
@Mike-Nahmias I got a new error...According to your message, my template.yaml file looks as below: `Resources: HelloWorldFunction: |
@Mike-Nahmias I had the configuration of dokcer as the links says, I run the build command before to start api. |
If anyone is still after an answer for this:
Longer explanation: aws-lambda-builders which is in control of the |
Closing as original query has been answered. |
@djm I made sure wheel is installed and my build still fails. |
+1 |
@Mike-Nahmias do you have a repo with the folder structure? im still getting import errors after copying the folder into my root directory. |
It worked for me too |
still getting the error: I set my Lambda's environment variables to include Not sure what step I'm missing. Would really appreciate help! |
Error Installing python pyodbc package in aws sam. (cmd used: sam build --use-container)
Error:
Build Failed
Error: PythonPipBuilder:ResolveDependencies - {pyodbc==4.0.27(sdist)}
Details:
Python Version: 3.6
sam version: SAM CLI, version 0.31.0
aws cli version: aws-cli/1.16.251
pip install pyodbc works, but when I include pyodbc in requirements.txt and run sam build --use-container it errors out.
Any comments or fixes to solve this issue
The text was updated successfully, but these errors were encountered: