I have been using Google Cloud Client Libraries for my project and getting import errors.
Import Error: No module named cloud
I have app.yaml in my project which looks like the following:
runtime: python27
api_version: 1
threadsafe: no
handlers:
- url: /.*
script: main
Now I have configured requirements.txt which has google-cloud-datastore and google-cloud-storage
requirements.txt
Flask==1.0.2
google-cloud-datastore
google-cloud-storage
google-api-python-client
Now when I import google.cloud in my main.py file I get the import error.
from google.cloud import storage
I have deployed the project on Google App Engine
After getting errors I changed my Project to Python 3.7 and then deployed on App Engine and to my surprise, it worked perfectly.
So is it because google-api-python-client is deprecated in Python 2.7 or am I doing something wrong in here