小编Shi*_*ang的帖子

在 VS 代码中将 .qmd 文件渲染为 html 时,我遇到了“ModuleNotFoundError:没有名为 'nbformat' 的模块”

我在 VS code 中编辑了 .qmd 文件,但未能将其渲染为 html。错误信息如下:

Starting python3 kernel...Traceback (most recent call last):
  File "D:\Program Files\Quarto\share\jupyter\jupyter.py", line 21, in <module> 
    from notebook import notebook_execute, RestartKernel
  File "D:\Program Files\Quarto\share\jupyter\notebook.py", line 16, in <module>
    import nbformat
ModuleNotFoundError: No module named 'nbformat'
Run Code Online (Sandbox Code Playgroud)

我想知道如何解决这个问题。

我猜问题出在 python 解释器上,但我不知道如何切换到 .qmd 文件下的另一个 python 解释器。

另外,我conda install nbformat在命令行中尝试过,安装成功。接下来,我再次渲染 .qmd 文件,再次出现相同的错误。

那么我该如何解决这个问题呢?

python jupyter visual-studio-code quarto

8
推荐指数
1
解决办法
6014
查看次数

标签 统计

jupyter ×1

python ×1

quarto ×1

visual-studio-code ×1