Reputation: 55
I'm working on a Python project using Google Cloud's pubsub.
In my Python file, there's the following import statement:
from google.cloud import pubsub_v1
Locally everything works as desired, but when I deploy it with:
gcloud app deploy
This error occurs on my app engine:
ModuleNotFoundError: No module named 'google' at (/srv/pubsub/pub.py:21)
What am I doing wrong?
Upvotes: 2
Views: 795
Reputation: 1028
Check the requirements.txt. Generally developer test on local but forget to include the library in requirements.txt App Engine will build the code in Cloud Build and will install dependencies listed in the requirements.txt metadata
Upvotes: 1