R kernel for Jupyter notebooks
I’m trying to >https://irkernel.github.io/installation/ from git_hub” “The devtools library on “installs IRkernel for jupyter notebook, but I get an error when installing. This is what I’m trying and the error I’m getting :
devtools::install_github('IRkernel/IRkernel')
Error:
‘C:\Program’ is not recognized as an internal or external command,
operable program or batch file. Installation failed: Command failed
(1)
I can’t install IRkernel from devtools, it returns the above error. Is there a problem with the R version? Can someone help?
Solution
The short answer to why it happens on Windows systems is that you have “C:\Program Files” and R doesn’t handle the white space in between:
This happens when both of the following conditions are met
– R is installed in a directory that contains whitespace in its name (e.g. “Program Files”)
– Short filenames (SFN) are disabled for the volume on which R is installed
You can verify this by issuing the following command:
R.home()
Workaround:
Try uninstalling and reinstalling R, this time in a brand new directory tree (not under \Program Files).
I understand it’s not the user’s fault, there’s also a ongoing issue thread on the package, but my suggestion above would be the quick fix you need.