I am trying to utilize the Google Cloud Platform's Stack Driver API with the following Python/Flask code below...
view.py
import google.cloud
from google.cloud import monitoring_v3
# from google.cloud.monitoring_v3 import query
requirements.txt
Flask==0.12.2
oauth2client==2.0.1
google-api-python-client==1.6.2
facebookads==2.11.1
httplib2==0.10.3
enum==0.4.6
requests-toolbelt==0.8.0
google-cloud-storage==1.6.0
google-resumable-media==0.3.1
google-auth
google-cloud-monitoring==0.28.0
google-cloud
For whatever reason it can't seem to find the monitoring_v3
library as when whenever I run the code I am getting the following error...
from google.cloud import monitoring_v3
ImportError: cannot import name monitoring_v3
I have tried to update to google-cloud-monitoring==0.29.0
and that just churns out another non-related error.
I solved it by upgrading monitoring 0.29.0
to 1.1.0
pip install --upgrade google-cloud-monitoring
Latest version now available is 2.0.0 https://pypi.org/project/google-cloud-monitoring/