Hello, I’m receiving the error below from the terminal using the default py file.
Can you tell me how/where to fix the issue?
Traceback (most recent call last):
File "transactions.py", line 3, in
from google.cloud import pubsub_v1
ImportError: cannot import name pubsub_v1
Sorry you’re having problems with this lab. First please make sure you’ve installed the necessary library in the Cloud Shell terminal with:
sudo pip3 install google-cloud-pubsub
When this video was recorded, the shell would default to Python 3, but I just tried it and for some reason that’s no longer the case. So you need to specify Python 3 when you run the script with:
Hope this helps!