Issues previewing/rendering a combined {python} and {r} Quarto document #9504
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
The only way currently to combine R and Python in one Quarto document is to use knitr and reticulate; you can't use It sounds like when you use knitr for your Quarto document, reticulate can't find the right Python environment. I usually do this by having a I also have found this blog post really helpful for combining R and Python in one Quarto document: |
Beta Was this translation helpful? Give feedback.
-
|
Thank you, I will try setting up a virtual environment in the project for reticulate to to find. |
Beta Was this translation helpful? Give feedback.

The only way currently to combine R and Python in one Quarto document is to use knitr and reticulate; you can't use
engine: jupyterbecause there isn't support for multiple language Jupyter kernels or multiple Jupyter kernels per document.It sounds like when you use knitr for your Quarto document, reticulate can't find the right Python environment. I usually do this by having a
uvvirtual environment right there in the project/workspace; I find that reticulate and Quarto do a good job of finding it in this situation. If you need to go a step further to get reticulate to find the right Python environment, check out these reticulate docs:https://rstudio.github.io/reticulate/articles/versi…