rgee icon indicating copy to clipboard operation
rgee copied to clipboard

R rgee gcloud has been installed but command not found

Open petermingjing opened this issue 2 years ago • 4 comments

  • rgee version: 1.1.5
  • R version: 4.2.3
  • Operating System: Mac OS Ventura 13.2.1

At submit an issue, please attached the following information of your rgee session:

  • [ ] You have the Python API installed (from terminal):
earthengine -h
```yes

- [ ] You can find the credentials file on your system: 
```r
library(rgee)
ee_path <- path.expand("~/.config/earthengine/credentials")
file.exists(ee_path)
```no
- [ ] You can run a simple EE command from R: 

```r
library(rgee)
yes
# Initialize the Earth Engine module.
ee_Initialize()
--
── rgee 1.1.5 ───────────────────────────────────────────────────────────────────────── earthengine-api 0.1.323 ── 
 ✔ user: not_defined
 ✔ Initializing Google Earth Engine:sh: gcloud: command not found
Fetching credentials using gcloud
Error: Exception: gcloud failed. Please check for any errors above and install gcloud if needed.

# Print metadata for a DEM dataset.
print(ee$Image('USGS/SRTMGL1_003')$getInfo())

Error: ee.ee_exception.EEException: Earth Engine client library not initialized. Run ee.Initialize()

Attach your Python (reticulate) configuration:

library(reticulate)
py_config()

python: /Users/jingming/.virtualenvs/rgee/bin/python libpython: /Users/jingming/Library/r-miniconda-arm64/lib/libpython3.10.dylib pythonhome: /Users/jingming/.virtualenvs/rgee:/Users/jingming/.virtualenvs/rgee version: 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:26:08) [Clang 14.0.6 ] numpy: /Users/jingming/.virtualenvs/rgee/lib/python3.10/site-packages/numpy numpy_version: 1.24.2 ee: /Users/jingming/.virtualenvs/rgee/lib/python3.10/site-packages/ee

NOTE: Python version was forced by RETICULATE_PYTHON

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

#ee_Initialize() can't go through...

ee_Initialize() ── rgee 1.1.5 ───────────────────────────────────────────────────────────────────────── earthengine-api 0.1.323 ── ✔ user: not_defined ✔ Initializing Google Earth Engine:sh: gcloud: command not found Fetching credentials using gcloud Error: Exception: gcloud failed. Please check for any errors above and install gcloud if needed.

petermingjing avatar Mar 21 '23 11:03 petermingjing

hi @petermingjing, please try the dev version of rgee.

remotes::install_github("r-spatial/rgee")

Please let us know if the problem persists!

csaybar avatar Mar 21 '23 12:03 csaybar

Hi Cesar,

I met this,

remotes::install_github("r-spatial/rgee") Error in loadNamespace(x) : there is no package called ‘remotes’ install.packages(remotes) Error in install.packages : object 'remotes' not found

On 21 Mar 2023, at 23:02, Cesar Aybar @.***> wrote:

hi @petermingjinghttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpetermingjing&data=05%7C01%7C%7Cc9348fa13b944a92245008db2a084536%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638149987229720809%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cCtWq9sHGxY0eqjyNqyMESgwNT976qeQ%2Bx4cKS9oPR4%3D&reserved=0, please try the dev version of rgee.

remotes::install_github("r-spatial/rgee")

Please let us know if the problem persists!

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fr-spatial%2Frgee%2Fissues%2F324%23issuecomment-1477758772&data=05%7C01%7C%7Cc9348fa13b944a92245008db2a084536%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638149987229720809%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NqABDAT1wiVBp1rQ4ONGvGiOqTOkVOCWFmGyInGjJxo%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXYJ76BE6KDIWR7QTLGPSJ3W5GNUBANCNFSM6AAAAAAWCI6XXY&data=05%7C01%7C%7Cc9348fa13b944a92245008db2a084536%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638149987229720809%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=kSZ43uMhf2Kh14aO4sWqoB4Bg4B9QjHzrjBHmHYS9dY%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

petermingjing avatar Mar 21 '23 12:03 petermingjing

It seems you have to install remotes first.

csaybar avatar Mar 21 '23 13:03 csaybar