You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to install a project that uses a package called wordcloud (python). This package has many dependencies, including numpy. I am using Zappa + Flask. (Slim Handler)
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:
Deploying API Gateway..
Scheduling..
Unscheduled wordcloudflask-dev-zappa-keep-warm-handler.keep_warm_callback.
Scheduled wordcloudflask-dev-zappa-keep-warm-handler.keep_warm_callback with expression rate(4 minutes)!
Error: Warning! Status check on the deployed lambda failed. A GET request to '/' yielded a 502 response code.
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:
[1595825062669] [ERROR] ModuleNotFoundError: No module named 'wordcloud.query_integral_image'
Traceback (most recent call last):
File "/var/task/handler.py", line 609, in lambda_handler
return LambdaHandler.lambda_handler(event, context)
File "/var/task/handler.py", line 240, in lambda_handler
handler = cls()
File "/var/task/handler.py", line 134, in __init__
self.app_module = importlib.import_module(self.settings.APP_MODULE)
File "/var/lang/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/tmp/wordcloudflask/app.py", line 5, in <module>
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
File "/tmp/wordcloudflask/wordcloud/__init__.py", line 1, in <module>
from .wordcloud import (WordCloud, STOPWORDS, random_color_func,
File "/tmp/wordcloudflask/wordcloud/wordcloud.py", line 30, in <module>
from .query_integral_image import query_integral_image
Possible Fix
The author of wordCloud, when confronted with the missing module error above, often suggests using conda. I think there is plenty of conversation around that already, but this is another vote for it. Conda support Miserlou/Zappa#108
Instead of seeing what we need based on the requirements.txt, why not allow us to package our own dependencies, hand them to you, and have them uploaded to S3?
By conda support, I mean me being able to specify that i need the dependencies installed with conda. I also hope that they are being compiled in the same type of environment as what is on AWS Python Lambdas (some strange form of Linux from what I hear)
Steps to Reproduce
Create Virtual env python3 -m venv myEnv
Activate env
pip install wordcloud
pip freeze > requirements.txt
Added some .whl files to requirements.txt (first time i didn't do this. Same result)
zappa deploy dev (slim handler)
Your Environment
Zappa version used: 0.51.0
Operating System and Python version: MacOS Catalina, Python 3.8
The output of pip freeze: Above
Link to your project (optional):
Your zappa_settings.json: Above
The text was updated successfully, but these errors were encountered:
Originally from: Miserlou/Zappa#2143 by JordanTreDaniel
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 Miserlou/Zappa#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: