Knitr Pandoc在R中暂停执行 [英] Knitr pandoc Execution halted in R

查看:160
本文介绍了Knitr Pandoc在R中暂停执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行Knitr和Rmarkdown时,即使使用knitr示例脚本,也会收到以下错误消息.

Error in system(paste(shQuote(pandoc_path), "--version"), intern = TRUE) : '"C:/Program Files/RStudio/bin/pandoc/pandoc"' not found Calls: <Anonymous> ... get_pandoc_version -> with_pandoc_safe_environment -> force -> system Execution halted

Error in system(paste(shQuote(pandoc_path), "--version"), intern = TRUE) : '"C:/Program Files/RStudio/bin/pandoc/pandoc"' not found Calls: <Anonymous> ... get_pandoc_version -> with_pandoc_safe_environment -> force -> system Execution halted

我已经从库中安装并加载了knitr和rmarkdown,或者使用开发工具从github获取最新版本.

I have installed and loaded knitr and rmarkdown from the libraries and alternatively using dev tools to get the most recent versions from github.

由于它以前可以正常运行,并且我没有更改任何设置,我想知道这是否是由于新的R版本引起的,并且是否引起了这种情况?

As it was working previously and I haven't changed any settings, I was wondering whether it might be due to the new R release and whether that has caused this?

我已尝试将pandoc 上载到错误中所请求的特定位置,但是在线指导很难遵循,因此没有移入文件夹,以防万一它变得更糟,因为为何我不知道为什么是错误之前不需要?

I have tried uploading pandoc to the specific location it requested in the error but the online guidance was difficult to follow so didn't move into folder just it case it made it worst, as it was not required before I was confused as to why it was an error?

不确定是否还有其他尝试方法,我已经搜索,搜索并浏览了knitr和pandoc网页,但没有任何线索.

Not sure what else to try out, I have googled, stackflowed and explored knitr and pandoc webpages for any clues but with not success.

如果有人知道如何尽快解决此问题,我将不胜感激!

If anyone knows how to fix this as soon as possible I would be very grateful!!

推荐答案

我知道这是一个非常老的问题,但是我遇到了完全相同的问题,即昨天编织一个Rmd文件完美地工作了,今天,该文件停止了工作.上面的相同错误消息.即使编织默认的Rmd入门文档也失败.

I know this is a very old question, but I had the exact same issue, where knitting an Rmd file worked perfectly yesterday, and today, stopped working with the identical error message above. Even knitting the default Rmd starter document failed.

我们的IS员工可能已经应用了Windows补丁,因为我根本没有更改设置,所以它可能损坏了某些东西.

It's possible that a Windows patch was applied by our IS folks that may have broken something, as I had not changed my setup at all.

执行Sys.which('pandoc')提示它在错误的位置(特定于用户的位置)查看.

Doing a Sys.which('pandoc') suggested that it was looking in the wrong place (a user-specific location).

更新RStudio没有帮助.将以下内容添加到我的Rmd文件中也不起作用:

Updating RStudio did not help. Adding the following to my Rmd file also did not work:

Sys.setenv(RSTUDIO_PANDOC="PATH_TO_MY_PANDOC_BIN")

最终有效的是Ivo Fugers的部分回应:

What eventually worked was a subset of the response by Ivo Fugers:

install.packages('installr')
install.pandoc()

(我没有密切注意,但认为我允许它卸载了另一版本的pandoc.)在系统重新启动后,编织又可以正常工作了.

(I wasn't paying close attention but think I allowed it to uninstall another version of pandoc.) After a system restart, knitting is working again.

希望这对以后的人们有所帮助,因为这似乎仍然是偶尔出现的问题.

Hope this helps folks in the future, as it seems to be a problem that still sporadically recurs.

这篇关于Knitr Pandoc在R中暂停执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆