Set GOOGLE_APPLICATION_CREDENTIALS in Python project to use Google API

后端 未结 4 1497
死守一世寂寞
死守一世寂寞 2020-12-23 09:42

I am a programming beginner and thing I\'m trying to learn how to use google API with Python.

I have:

  1. created a project on Google Cloud an
4条回答
  •  太阳男子
    2020-12-23 09:52

    If you're working on a jupyter notebook and want to set GOOGLE_APPLICATION_CREDENTIALS environment variable in Python code :

    import os
    os.environ["GOOGLE_APPLICATION_CREDENTIALS"]="/path/to/file.json"
    

提交回复
热议问题