[Python] Quarto Unable to Render Python

Discussão em 'Python' iniciado por Stack, Agosto 25, 2025.

  1. Stack

    Stack Membro Participativo

    I cannot render Quarto documents that contain Python code chunks.

    I can successfully render Quarto documents that contain R code chunks.

    Error message


    The error message I receive is:

    ==> quarto preview example.Qmd --to html --no-watch-inputs --no-browse

    ERROR: Unable to render example.Qmd

    Stack trace:
    at fileExecutionEngineAndTarget (file:///C:/PROGRA~1/Quarto/bin/quarto.js:41260:15)
    at async renderContexts (file:///C:/PROGRA~1/Quarto/bin/quarto.js:72183:32)
    at async renderFormats (file:///C:/PROGRA~1/Quarto/bin/quarto.js:72234:22)
    at async file:///C:/PROGRA~1/Quarto/bin/quarto.js:98062:24
    at async Command.fn (file:///C:/PROGRA~1/Quarto/bin/quarto.js:98059:25)
    at async Command.execute (file:///C:/PROGRA~1/Quarto/bin/quarto.js:8104:13)
    at async quarto (file:///C:/PROGRA~1/Quarto/bin/quarto.js:114968:5)
    at async file:///C:/PROGRA~1/Quarto/bin/quarto.js:114986:9

    Reprex


    It's not quite a reproducible example, but it's the best I can achieve given the error.

    I am using the following CLI syntax to render an example document which lives on my Desktop:

    quarto render Desktop\example.Qmd


    The contents of Desktop\example.Qmd are (when I attempt python - I just switch the 'python' to 'r' when I want to render R.):

    ---
    title: Example
    subtitle: Example
    format: html
    ---

    ```{python}
    2 + 2
    ```

    SetUp

    Machine


    Microsoft Windows 11 Home

    Version 10.0.22621 Build 22621

    Software Versions


    All of the paths listed below are on my PATH Environment variable.


    • R 4.3.0 (Path: C:\Program Files\R\)


    • Python 3.12.1 (Path: C:\Program Files\Python312\)


    • Quarto 1.4.547 (Path: C:\Program Files\Quarto)
    Jupyter


    Following Using Python from Quarto, i used the following command to install Jupyter:

    py -m pip install jupyter

    Which was installed at C:\Users\me\appdata\roaming\python\python312\site-packages

    Running the Quarto command quarto check jupyter returns:

    Quarto 1.4.547
    [>] Checking Python 3 installation....OK
    Version: 3.12.1
    Path: C:/Program Files/Python312/python.exe
    Jupyter: 5.7.1
    Kernels: python3

    [>] Checking Jupyter engine render....OK

    Continue reading...

Compartilhe esta Página