I am trying to authenticate google earth engine(ee) in my anaconda env and i receive error -Exception: gcloud failed.. python import ee works wll

Viewed 31
(forestapp) C:\Users\Me>python
Python 3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import gcloud
>>> exit()

(forestapp) C:\Users\Me>earthengine authenticate
Fetching credentials using gcloud
'gcloud' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\forestapp\Scripts\earthengine-script.py", line 9, in <module>
    sys.exit(main())
  File "C:\ProgramData\Anaconda3\envs\forestapp\lib\site-packages\ee\cli\eecli.py", line 82, in main
    _run_command()
  File "C:\ProgramData\Anaconda3\envs\forestapp\lib\site-packages\ee\cli\eecli.py", line 61, in _run_command
    dispatcher.run(args, config)
  File "C:\ProgramData\Anaconda3\envs\forestapp\lib\site-packages\ee\cli\commands.py", line 355, in run
    self.command_dict[vars(args)[self.dest]].run(args, config)
  File "C:\ProgramData\Anaconda3\envs\forestapp\lib\site-packages\ee\cli\commands.py", line 397, in run
    ee.Authenticate(**args_auth)
  File "C:\ProgramData\Anaconda3\envs\forestapp\lib\site-packages\ee\__init__.py", line 104, in Authenticate
    return oauth.authenticate(authorization_code, quiet, code_verifier, auth_mode,
  File "C:\ProgramData\Anaconda3\envs\forestapp\lib\site-packages\ee\oauth.py", line 381, in authenticate
    _load_app_default_credentials(auth_mode == 'gcloud', scopes, quiet)
  File "C:\ProgramData\Anaconda3\envs\forestapp\lib\site-packages\ee\oauth.py", line 291, in _load_app_default_credentials
    raise Exception('gcloud failed. Please check for any errors above '
Exception: gcloud failed. Please check for any errors above and install gcloud if needed.

(forestapp) C:\Users\Me>

The gcloud is already installed, as proven by the python import gcloud, but earthengine authenticate fails.

0 Answers
Related