When rendering a Quarto file > Unable to locate an installed version of R

I'm using macOS Monterey 12.3.1. I recently updated Quarto to version 1.3.433.

When I render my Quarto file in R Studio IDE I get a fail message (in the 'Background Jobs' panel) stating 'Unable to locate an installed version of R.'

I can run individual chunks in Quarto that require e.g. dplyr, tidyr, readr, stringr and all seems ok (so it's finding R from somewhere, no?)

To try to address this issue I tried the following:

  1. I updated RStudio to Version: 2023.06.1+524 and R to 4.3.1 (2023-06-16). I closed my Project and RStudio and restarted, but did not reboot OS?
  2. I followed the advice on the Quarto site to check for the presence of multiple installations of R and Python in a system Quarto - Troubleshooting

This is what my 'quarto-session-info-output.txt' file looks like - is there an issue with some packages - especially knitR ?

  1. I also ran 'quarto check' in the Terminal after reading this community question quarto: unable to locate R installation. The output for this didn't show a check for R installation

I'm unsure how to interpret these outputs, any assistance appreciated!

Looking at your error message,

  • it seems to be related to renv trying to run a R command
  • This R command not being successful for some reason- maybe trying to install a R package and it is not working ?

So you should check your renv usage, and be sure that you have the tools to install packages from source.

As R environment can't be setup correctly when starting with renv, Quarto sees that as an issue with R not being available.

Ah ok, that makes sense - I copied my repository and didn't initiate renv() this time, and all ok now with rendering my Quarto file

Not quite sure what happened with renv() originally - should I be doing something extra with renv() if I update a version of R or RStudio?

Not quite sure. Usually when you update R to a major or minor version, it is good practice to rebuild everything. But renv should do that by default by having a project library per version, unless you configured differently.

Anyhow, you should check that renv is initialized and restored correctly to be sure that Quarto can run R code.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.