Quarto: Difference between revisions
mNo edit summary |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 77: | Line 77: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
If you encounter this message while generating PDF documents, you need to add a LaTex distribution to your path (e.g. texLiveFull). If you use "quarto install tinytex", quarto will download a dynamically linked binary that is incompatible with nix. If you've previously run this command, you may need to remove it before rendering PDF documents works as intended. | If you encounter this message while generating PDF documents, you need to add a LaTex distribution to your path (e.g. texLiveFull). If you use "quarto install tinytex", quarto will download a dynamically linked binary that is incompatible with nix. If you've previously run this command, you may need to remove it before rendering PDF documents works as intended | ||
== Issue with reticulate not finding the python installation == | |||
<syntaxhighlight lang="ini"> | |||
13. └─knitr (local) engine(options) | |||
14. └─reticulate::eng_python(options) | |||
15. └─reticulate:::eng_python_initialize(options = options, envir = environment()) | |||
16. └─reticulate:::ensure_python_initialized() | |||
17. └─reticulate:::initialize_python() | |||
18. └─reticulate (local) python_not_found("Installation of Python not found, Python bindings not loaded.") | |||
</syntaxhighlight> | |||
If you encounter this message when trying to render python chunks, one solution is to add the following to default.nix example above so that 'reticulate' knows where python3(in this example) lives in the nix store: | |||
<syntaxhighlight lang="diff"> | |||
@@ -24,4 +24,7 @@ | |||
# You may be able to use a smaller distribution or customize depending on your needs. | |||
texliveFull | |||
]; | |||
+ shellHook = '' | |||
+ export RETICULATE_PYTHON=$(which python3) | |||
+ ''; | |||
</syntaxhighlight>When the issue appears in vscodium, one can fix it via wrapping <code>codium</code> binary:<syntaxhighlight lang="nix"> | |||
pkgs.vscodium.overrideAttrs (old: { | |||
installPhase = '' | |||
${old.installPhase or ""} | |||
wrapProgram $out/bin/codium \ | |||
--set RETICULATE_PYTHON ${pkgs.python3}/bin/python3 | |||
''; | |||
}) | |||
</syntaxhighlight> | |||