title: Configuring Google Translate on Windows
body: <p>I want to use Google Translate API in my Python application and I have read through the documentation and I have set my Service Account and downloaded the JSON file now according to the documentation I am supposed to run a:</p>
  
  <pre><code>$ export GOOGLE_APPLICATION_CREDENTIALS=&lt;path_to_service_account_file&gt;
  </code></pre>
  
  <p>Now I am doing my development on a Windows machine and I tried using the</p>
  
  <pre><code>&gt;setx GOOGLE_APPLICATION_CREDENTIALS "&lt;path_to_service_account_file&gt;"
  </code></pre>
  
  <p>It generated a success however when I tried to create a translate object I kept getting the following error:</p>
  
  <pre><code>from google.cloud import translate
  trans = translate.Client()
  
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Users\achim\Envs\expert-farmer\lib\site-packages\google\cloud\translate\client.py", line 66, in __init__
      super(Client, self).__init__(credentials=credentials, _http=_http)
    File "C:\Users\achim\Envs\expert-farmer\lib\site-packages\google\cloud\client.py", line 128, in __init__
      credentials = get_credentials()
    File "C:\Users\achim\Envs\expert-farmer\lib\site-packages\google\cloud\credentials.py", line 39, in get_credentials
      credentials, _ = google.auth.default()
    File "C:\Users\achim\Envs\expert-farmer\lib\site-packages\google\auth\_default.py", line 282, in default
      raise exceptions.DefaultCredentialsError(_HELP_MESSAGE)
  google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or
  explicitly create credential and re-run the application. For more
  information, please see
  https://developers.google.com/accounts/docs/application-default-credentials.
  </code></pre>