问题如下:

我在Rmarkdown中写入python代码,运行都ok,但是在knit时报错如下:

Rmarkdown中写入python chunk,knit时This application failed to start because it could……

我在网上搜了很多方法,让重新安装pyqt5居多,但是我试了依然不行,最后发现是少了PyQt5的环境变量,在anaconda下有这样一个文件夹:

Rmarkdown中写入python chunk,knit时This application failed to start because it could……

需要把这个路径新添加到环境变量中,名为QT_QPA_PLATFORM_PLUGIN_PATH,如下:

Rmarkdown中写入python chunk,knit时This application failed to start because it could……

重新启动Rstudio,重新knit即可。

相关文章:

  • 2021-05-24
  • 2022-02-08
  • 2022-12-23
  • 2021-05-14
  • 2021-08-22
  • 2022-12-23
  • 2021-07-30
猜你喜欢
  • 2021-07-12
  • 2021-05-11
  • 2021-10-24
  • 2021-09-26
  • 2021-07-21
  • 2022-12-23
相关资源
相似解决方案