0

When invoking the R function reticulate::use_condaenv("my_conda_env") the function summarily fails with a json parse error message: "WARNING..."

John Mark
  • 311
  • 1
  • 8

1 Answers1

0

This error occurs for deprecated conda versions that return a warning when generating json output. Looking at the R source, this occurs in reticulate::conda_list, in the call

system2(conda, args = c("info", "--json"), stdout = TRUE))

Which writes to the console *"WARNING: The conda.compat module is deprecated and will be removed in a future release." This get pre-pended to the JSON output and causes the following parse command jsonlite::fromJSON to choke.

This is fixed by upgrading conda to version 4.6.14 or greater, where this warning no longer appears. Upgrade with

conda updata conda

John Mark
  • 311
  • 1
  • 8