【问题标题】:Unable to Knit To PDF the R-notebook containing Python code [duplicate]无法将包含 Python 代码的 R-notebook 编织成 PDF [重复]
【发布时间】:2020-06-18 11:44:59
【问题描述】:

我是 KNIT TO PDF 这本 R-notebook 包含以下 Python 代码:

import matplotlib
import numpy as np
import matplotlib.pyplot as plt

t = np.arange(0.0, 2.0, 0.01)
s = 1 + np.sin(2*np.pi*t)
plt.plot(t, s)
plt.xlabel('time (s)')
plt.ylabel('voltage (mV)')
plt.grid(True)
plt.savefig("test.png")
plt.show()

当我选择 Knit To PDF 时,出现此错误:

此应用程序无法启动,因为它无法在“”中找到或加载 Qt 平台插件“windows”。重新安装应用程序可能会解决此问题。

On the other hand, when choosing to Knit To PDF a R-notebook that contains only R code, everything works fine.

你能帮我解决这个错误吗?

【问题讨论】:

    标签: r rstudio r-markdown knitr reticulate


    【解决方案1】:

    我在https://stackoverflow.com/a/50711837/7357673 找到了我的问题的答案。我在这里发布它是为了结束这个问题并为未来的访问者。

    【讨论】:

      猜你喜欢
      • 2021-07-06
      • 2020-06-07
      • 2021-04-14
      • 2017-02-17
      • 2015-04-04
      • 2021-04-20
      • 1970-01-01
      • 1970-01-01
      • 2021-05-03
      相关资源
      最近更新 更多