Question

I was trying to install Knitr package in Lyx but I encountered the following error.

"The module knitr requires a package that is not available in your Latex installation or a converter that you have not installed. Latex output may not be possible. Package missing Knitr>latex."

I would greatly appreciate if you could please help me to fix this problem. I checked the Lyx module but couldn't figure out exactly what to do. I am a new user to Lyx and Knitr.

Thank you in advance

Was it helpful?

Solution

That is often an indication of the PATH problem; see the first section of the LyX/Sweave/knitr manual (link to PDF is at http://yihui.name/knitr/demo/lyx/)

OTHER TIPS

Ahem... In Windows 10, using MikTeX, you should be aware that R installs under x64 and i386 architecture so that when you run R.home('bin') in R it gives:

"C:/Users/DIEGOA~1.ACO/DOCUME~1/R/R-34~1.2/bin/i386" for i386 architecture and "C:/Users/DIEGOA~1.ACO/DOCUME~1/R/R-34~1.2/bin/x64" for x64 architecture... You should test both when adding the Rnw(knitr) in LyX (One complains, the other doesn´t)...

Hope this helps...

I had this same error message on my Windows 10 machine and found that the error was in the path I provided for R. If you don't have the path all the way to the R executable, it will not work. Change the path in Lyx with Tools>Preferences>Paths and edit the PATH prefix content. I had to add

                C:\Program Files\R\R-3.6.0\bin\x64
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top