-
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
502 While Deploying (ModuleNotFound Errors) #2143
Comments
Try switching (in zappa_setting of course: "runtime": "python3.6") to python 3.6 and see if its working. (maybe 3.7 will also work) |
@akobig That actually helped! Now i get to the second problem I have been seeing, which is |
yeah its probably due to a mismatch of your local env python version which is I guess 3.8 and the lambda version which is now 3.6. try installing numpy in a 3.6 local python env, zappa update and tell us if worked I'm interested. |
EDIT: It's looking like my issue is related to a known issue with slim_handler when deploying from Windows. I opened a new issue at #2145I'm running into a similar issue/behavior but not sure if it's related. I'm encountering an issue returning the error Is there a way to force it to put my index.py file in that zip? zappa_settings.json:
EDIT: Upon including the file in the zip and uploading manually I find that it is also giving me an import error for pandas which is installed in my venv so in fact I may be having the same issue. The new error is: The index.py that contains my handler is essentially:
|
@akobig Thank you! That worked! I am very confused why i get 3.8 when i run |
Hey @akobig Thanks! |
Context
I am trying to install a project that uses a package called
wordcloud
(python). This package has many dependencies, includingnumpy
. I am using Zappa + Flask. (Slim Handler)Running Python 3.8
Zappa Settings:
Requirements.txt:
I put in the requests for .whl files at the bottom because I thought that may help. But I don't even know if they are triggering a download.
When running
zappa deploy dev
, everthing goes well up to this point:Expected Behavior
Should upload to s3 + Lambda, and use the dependencies correctly.
Actual Behavior
I get the error above, and I can't help but to feel like it has something to do with the way that Zappa is adding/zipping the dependencies. Does it matter that I ran
pip install wordcloud
from a venv on my Mac? Would that affect the way things are compiled?Running
zappa tail
, I get this:Possible Fix
conda
. I think there is plenty of conversation around that already, but this is another vote for it. Conda support #108requirements.txt
, why not allow us to package our own dependencies, hand them to you, and have them uploaded to S3?Steps to Reproduce
python3 -m venv myEnv
pip install wordcloud
pip freeze > requirements.txt
zappa deploy dev
(slim handler)Your Environment
pip freeze
: Abovezappa_settings.json
: AboveThe text was updated successfully, but these errors were encountered: