是Quarto能够呈现与ippython魔术文档?



考虑以下文档:

---
title: "Untitled"
format: pdf
jupyter: r-reticulate
---
```{python}
%load_ext rpy2.ipython
```

呈现时,会产生以下错误:

An error occurred while executing the following cell:
------------------
%load_ext rpy2.ipython
------------------

所以我的问题是:Quarto能够用ipython魔术渲染文档吗?

我刚刚发现,它的工作,如果我使用{ipython}而不是{python}:

---
title: "Untitled"
format: pdf
jupyter: r-reticulate
---
```{ipython}
%load_ext rpy2.ipython
```

编辑

在@shafee(我非常感谢他)的帮助下,发现quarto可以使ipython变魔术。虽然rpy2安装在r-reticulate环境中,但还是出现了问题。然而,在默认的python环境中安装了rpy2之后,这个问题就消失了,即使在使用r-reticulate环境时也是如此。

这很奇怪,并且已经提出了一个问题:

https://github.com/quarto-dev/quarto/issues/53

最新更新