-
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
Build failed - Error: PythonPipBuilder:ResolveDependencies #1840
Comments
I solved this using |
Are you using AWS Toolkit for Pycharm? |
I'm seeing something similar: $ sam build
Building resource 'PaymentsDataStreamFunction'
Running PythonPipBuilder:ResolveDependencies
Build Failed
Error: PythonPipBuilder:ResolveDependencies - {pyyaml==5.3.1(sdist), pyrsistent==0.15.7(sdist)} Both pyyaml & pyrsistent are inside my requirements.txt file, which have been installed inside a virtualenv. |
Do you have wheel installed? if not |
wheel is installed. |
@c2tarun yes, I am using this plugin |
Same here - Used another dep that depends on Thanks for opening the issue, I'll spend a couple of days rewriting the lib and build a wheel from that instead |
I'm getting same issue when I use sam build --use-container (Windows, Python 3.6, SAM CLI version 0.47.0): |
Same. It seems like it fails to build anything with tensorflow or better yet grpcio |
My current workaround is to manually add
It seems to fail with version 1.28. |
I'm seeing a similar error with the following in requirements.txt I am running:
Output: Fetching lambci/lambda:build-python3.7 Docker container image...... Build Failed wheel is installed. I'm getting the same error when I add psycopg2 to the requirements.
|
+1 |
+1
|
If your dependencies have C bindings involved, building within the container is the way forward in those cases. Toolkits have an explicit checkbox that can be enabled to allow for all builds to be within a build container. Closing this issue, please re-open if you feel this doesn't answer your original question. |
got the following error started appearing during
SAM CLI, version 1.20.0
|
UnsatisfiedLinkError: com.amazonaws.kinesisvideo.producer.jni.NativeKinesisVideoProducerJni.getNativeLibraryVersion()Ljava/lang/String |
I was running into |
Solved updating SAM CLI from version 1.22.0 to version 1.29.0 |
I'm having the same issue
produces
However, installing the requirements.txt with pip in the host machine produces no error. I also tried to update my sam version from 1.27.2 -> 1.31.0 and I get the same error. |
I have the same issue. Tried installing wheel, using --use-container, updating sam to 1.31. None is helpful. The most weird thing is it was working last week, but suddenly broke today. Nothing has changed at all! |
Reopening since this still seems to be an issue. Potentially related: aws/aws-lambda-builders#280 |
I think I was able to get little more insight into the issue. MacOS + pyenv
so the expectation would be following to work
After some digging around did this: before or after to my surprise it was pointing to ran and then Please check and confirm here if this works for you too. |
same issue for jsonschema. Build Failed |
Same issue with autobahn (although this can happen with any dependency):
In my case the used version was not compatible (22.3.2). I updated my requirements.txt with:
and then run:
I found the working version after some searching in the repo of the main package using this dependency but this worked for me. |
@
how do you test it locally after building with container? |
Just add some extra insights here. sam project structure as follows: I am using a local module and declare it as "-e relative/path" at requirements.txt. The problem is that the relative path declared is very tricky. When |
This definitely worked for me. But, could someone explain why is this needed? It would be great if it worked out of the box |
My set of tricks to make it work on Apple M1 (MacOS 11.6 Big Sur) brew remove aws-sam-cli # will be installed below using pip
brew install pyenv
# Also you may need to remove an existing python version.
# I had to remove and reinstall it back later after all other commands to make things work
# brew remove [email protected]
pyenv install 3.7.13 # < 3.7 is currently required by AWS SAM
pyenv global 3.7.13
vim ~/.zshrc || vim ~/.bashrc
### add these lines to the *rc file:
# >> PYENV
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
# << PYENV
#save and close the file
#open a new terminal window
pip install aws-sam-cli wheel
# you may also need this if you have Podman, even if you build locally:
# pip install paramiko Check versions: python -V && pip -V && sam --version
# Python 3.7.13
# pip 22.0.4 from /Users/yevhen.hlotov/.pyenv/versions/3.7.13/lib/python3.7/site-packages/pip (python 3.7)
# SAM CLI, version 1.53.0 Build the project with |
To anybody who sees this in the future, the I was having the same issue as this thread (and like others, I was able to resolve using I only figured this out because my deployment package became too large to deploy, and I realized it was bundling a ton of packages I didn't need. This led me to realize I didn't have an virtual env configured. |
I am still seeing this issue with sam build --use-container. Using podman on macOS (tried PKG, homebrew, and now pyenv. Using DOCKER_HOST. sam local invoke and sam local start-api only work with ---skip-pull-image. sam build without use-container works Build Failed trying the hello world example |
On the surface, my problem seemed to be the same as many others here. But it turns out that my issue was an expired token to our CodeArtifact repository (which we use for all our Python dependencies). This became evident when using the |
I have the same
|
I have the same, but for another package: lightgbm 4.2.0 Final incompatible: {lightgbm==4.1.0(wheel)} I had to downgrade my lgbm version to 3.3.5 and it the build worked, testing locally too. |
Description
Trying to create Python Lambda function from PyCharm not working
Steps to reproduce
Invoke Lambda creation using "Create new AWS Lambda..."
Runtime: Python 3.7
requirements.txt: https://pastebin.com/HpU1it63
Run using strict template file:
template.yml:
Observed result
Used graphical create, not CLI, error:
Full log: https://pastebin.com/asgCa9D4
Expected result
Successful build
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
OS: macOS Mojave 10.14.6
SAM: SAM CLI, version 0.43.0
P: Python 3.7.6
IDE: PyCharm 2019.3
AWS: aws-cli/2.0.1 Python/3.7.4 Darwin/18.7.0 botocore/2.0.0dev5
used wheel: wheel 0.34.2
used pip: pip 19.0.3
The text was updated successfully, but these errors were encountered: