Calling python via reticulate in an R Markdown document

I have a somewhat simple question that I’m not quite sure how to solve in NixOS.
I have an R Markdown document that uses python via the reticulate library. Normally, to do so you have to direct R as to where python is, done via:


Now, to get python working in an directory, normally I follow That is, I create a shell.nix file and run nix-shell. Then I can install packages, run python, etc.

However, obviously since NixOS keeps these programs in a different location, I was wondering if anyone knows how I can substitute use_python("/usr/local/bin/python")? Thanks in advance for any help and sorry if this is a very obvious problem.

It looks like this issue is related: `quarto` can't build mixed Python and R documents due to `rPackages.reticulate` not finding the Python interpreter · Issue #244575 · NixOS/nixpkgs · GitHub

Thanks for the reply! I got wiped out by a pretty bad flu after posting and will just now check into the link you shared. Cheers!