[Python] quarto dashboard shiny package not found

Discussão em 'Python' iniciado por Stack, Julho 4, 2025.

  1. Stack

    Stack Membro Participativo

    I have a quarto dashboard that makes use of shiny. The test.qmd file starts like this:

    ---
    title: "Test"
    format: dashboard
    server: shiny
    ---

    ...


    When running quarto preview function within VS Code (i.e. using the shortcut CTRL+SHIFT+K), the shiny server starts up as expected.

    However, when I run the quarto preview command from within an external terminal (with my venv activated), I get an error:

    $ quarto preview test.qmd

    Starting python3 kernel...Done

    Executing 'test.quarto_ipynb'
    Cell 1/2: ''...Done
    Cell 2/2: ''...Done

    pandoc
    to: html
    output-file: test.html
    template: >-
    C:\Users\XXXXXX\AppData\Local\Programs\Quarto\share\formats\dashboard\template.html
    standalone: true
    section-divs: true
    html-math-method: mathjax
    wrap: none
    default-image-extension: png
    variables: {}

    metadata
    document-css: false
    link-citations: true
    date-format: long
    lang: en
    page-layout: custom
    title: Test
    server:
    type: shiny
    remove-hidden: all

    Output created: Test.html

    Watching files for changes
    ERROR: The shiny package is required for documents with server: shiny

    Install the latest version of shiny with pip install --upgrade shiny


    I confirm that shiny v.1.4.0 is already installed in my venv.

    It seems as if quarto is not really using my activated venv.

    Continue reading...

Compartilhe esta Página