Quarto代码块中Bash命令无法执行,点击运行无响应求助
Quarto Bash代码块无法执行问题排查与解决
尝试运行Quarto官方文档中的Bash命令教程代码时,点击代码块的「Run Cell」按钮无任何反应,也没有返回结果。运行quarto check检查安装状态,结果如下:
quarto check Quarto 1.7.31 [✓] Checking environment information... Quarto cache location: /home/user/.cache/quarto [✓] Checking versions of quarto binary dependencies... Pandoc version 3.6.3: OK Dart Sass version 1.85.1: OK Deno version 1.46.3: OK Typst version 0.13.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.7.31 Path: /home/user/tools/quarto/bin [✓] Checking tools....................OK TinyTeX: (not installed) Chromium: (not installed) [✓] Checking LaTeX....................OK Tex: (not detected) [✓] Checking Chrome Headless....................OK Chrome: (not detected) [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.10.12 Path: /usr/bin/python3 Jupyter: (None) Jupyter is not available in this Python installation. Install with python3 -m pip install jupyter [✓] Checking R installation...........(None) Unable to locate an installed version of R. Install R from https://cloud.r-project.org/
解决步骤
- 问题核心:Quarto的交互式代码块(包括Bash)依赖Jupyter提供运行环境,当前系统未安装Jupyter是导致无法执行的关键原因。
- 执行命令安装Jupyter:
python3 -m pip install jupyter - 安装完成后,重启Quarto编辑器(或刷新网页端编辑器),再次尝试点击「Run Cell」执行Bash代码块。
- 注:R环境缺失不影响当前Bash代码执行,仅在需要运行R代码时才需安装。
内容的提问来源于stack exchange,提问作者SpicyChicken
相关产品推荐
相关产品推荐

