Setting up Environment Variable for GCP
<p>I read <a href="https://developers.google.com/identity/protocols/application-default-credentials" rel="nofollow">this</a> article but I still don't understand how I have to set up the environment variable with the <code>.json</code> file with the credentials. Do I have to enter something in the Terminal or write something in my Python code?</p>

<p>Also, is the path relative to the user directory? Thanks</p>

<p>You can do either: the key part is that the environmental variable must be present for the SDK to pick up in the code that you're running. You could set it programmatically in Python (<a href="http://stackoverflow.com/questions/5971312/how-to-set-environment-variables-in-python">example</a>) or in your terminal (<a href="http://stackoverflow.com/questions/234742/setting-environment-variables-in-linux-using-bash">example</a>), depending on what you want to do. You just need the process that's executing your code to have the variable set in <em>its</em> environment.</p>

<p>Use an absolute path.</p>

python environment-variables google-cloud-platform