Cannot launch pandoc in rstudio

2019-04-13 14:12发布

问题:

I cannot use knitr anymore, either for html or pdf, each time i give the order knit I obtain this result

Error in system(paste(shQuote(pandoc_path), "--version"), intern = TRUE) : 
  'CreateProcess' failed to run 'D:\Datos de Usuarios\Usuario\AppData\Local\Pandoc\pandoc.exe --version'
Calls: <Anonymous> ... get_pandoc_version -> with_pandoc_safe_environment -> force -> system
Ejecución interrumpida

I have this system:

  • rstudio 0.99.441
  • R 3.2.0
  • Windows 8.1 64 bits
  • pandoc installed and present where it is pointed in the output, although rstudio seems to fail to launch
  • Library packages folder is directed to a specific adress

Possible reasons: i downloaded an r.project for a book to be compiled and tried to knitr with partial succes. Then the problem started.

  • I uninstalled rstudio and start again and no result.
  • Updates for windows were installed meanwhile
  • updates for packages unsuccesful when github and compilation is involved.

Previously everything worked. Any suggestion?

Thanks a lot

回答1:

Hi i finally solved it: the question was simpler than expected.

I had two pandoc installations, the first one was the internal rstudio located in rstudio/bin, the second was installed somehow and located at Userdata/Apps/local/pandoc/.

Then knitr was searching for pandoc in the new path but failed to built the path variables due to this confusing issue related with /\ (slash) characters in R (with windows 8?)

The solution: uninstal external pandoc, reinstall rstudio and. alehop¡¡¡ everything operative, although the issue about knitr not producing the path properly persists in windows in windows 8.

It seems that just explaining the problem to others help you think.

Cheers