-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in ee_Initialize() : reticulate refuse to connect with rgee #91
Comments
Hi, I just found the solution! Apparently this come from an update of Conda version. You have just to update your conda version with the following : |
Hi @pjaguirreh your conda env looks good. It seems the problem is that
If it doesn't work try:
If you persist presenting this problem please attached us your rgee env:
|
Please attached us the following information: library(rgee)
library(reticulate)
earthengine_python <- Sys.getenv("EARTHENGINE_PYTHON", unset = NA)
Sys.setenv(RETICULATE_PYTHON = earthengine_python)
reticulate::py_config() |
Please, Can you run again? I updated the message library(rgee)
library(reticulate)
earthengine_python <- Sys.getenv("EARTHENGINE_PYTHON", unset = NA)
Sys.setenv(RETICULATE_PYTHON = earthengine_python)
reticulate::py_config() OBS: You need to restart R before to run again reticulate::py_config |
Hi @pjaguirreh really strange, but for some reason, you have miniconda with Python36 and Python38. ee_Initialize()
traceback() Do not forget to restart your R session. |
Ok, it helps. Can you run the follows please, if you get an error please share with us the traceback() library(rgee)
earthengine_python <- Sys.getenv("EARTHENGINE_PYTHON", unset = NA)
print(earthengine_python)
Sys.setenv(RETICULATE_PYTHON = earthengine_python)
ee_current_version <- system.file("python/ee_utils.py", package = "rgee")
ee_utils <- rgee:::ee_source_python(ee_current_version)
print(ee_utils$ee$'__version__') OBS: You need to restart R before to run rgee:::ee_source_python |
HI @pjaguirreh, I really do not understand why you get refuse error. Does the code below work for you? earthengine_python <- Sys.getenv("EARTHENGINE_PYTHON", unset = NA)
print(earthengine_python)
Sys.setenv(RETICULATE_PYTHON = earthengine_python)
ee_current_version <- system.file("python/ee_utils.py", package = "rgee")
ee_utils <- try(rgee:::ee_source_python(ee_current_version), silent = TRUE)
con_reticulate_counter <- 0
while (any(class(ee_utils) %in% "try-error")) {
ee_utils <- try(rgee:::ee_source_python(ee_current_version),
silent = TRUE)
con_reticulate_counter <- con_reticulate_counter + 1
if (con_reticulate_counter == 4) {
stop("reticulate refuse to connect with rgee")
}
} |
Apparently, if I just don't run "ee_check()" there's no problem with "ee_Initialize()". I was already able to run the examples in the rgee site. ee_Initialize() |
Thanks, happy to see |
|
Thanks to the suggestions above, the following solved the issue for me:
|
Hi!
I'm getting the following error when trying to execute the ee_Initialize() command: Error in ee_Initialize() : reticulate refuse to connect with rgee.
I followed the instructions from the rgee site and when I run ee_check() I get the following message, I don't know if it's related:
Any guidance?
Thanks
Matrix products: default
locale:
[1] LC_COLLATE=Spanish_Chile.1252 LC_CTYPE=Spanish_Chile.1252 LC_MONETARY=Spanish_Chile.1252
[4] LC_NUMERIC=C LC_TIME=Spanish_Chile.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] reticulate_1.16 rgee_1.0.4
loaded via a namespace (and not attached):
[1] compiler_4.0.2 magrittr_1.5 assertthat_0.2.1 Matrix_1.2-18 cli_2.0.2 tools_4.0.2
[7] glue_1.4.1 rstudioapi_0.11 rappdirs_0.3.1 Rcpp_1.0.5 crayon_1.3.4 fansi_0.4.1
[13] grid_4.0.2 jsonlite_1.7.0 lattice_0.20-41
The text was updated successfully, but these errors were encountered: