The model.qmd file uses python code but does not specify which python env and/or quarto engine is used. By default, quarto uses knitr engine so it tries to use a python env that reticulate finds. This env does not necessarily contain all the required packages and is likely going to be different from the virtual env created by user for this project. My suggestion is to add this R code chunk at the top of model.qmd:
The model.qmd file uses python code but does not specify which python env and/or quarto engine is used. By default, quarto uses knitr engine so it tries to use a python env that reticulate finds. This env does not necessarily contain all the required packages and is likely going to be different from the virtual env created by user for this project. My suggestion is to add this R code chunk at the top of model.qmd:
assuming that the created virtual env is
.venv
as recommended in Appendix D.