Ankur
Ankur

Reputation: 151

R kernel for Jupyter notebook

I am trying to install the IRkernel for jupyter notebook from devtools library on git_hub "https://irkernel.github.io/installation/", but get an error while installation. Here is what I am trying and the error that I get:

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 am not able to install the IRkernel from devtools, it returns the above error. Is there some problem with the R version? Can anyone please help?

Upvotes: 3

Views: 1317

Answers (2)

Akshay Kadidal
Akshay Kadidal

Reputation: 535

if you are using anaconda you can try this. Open the anaconda command prompt and type in

conda install -c r r-irkernel 

source: https://anaconda.org/r/r-irkernel

Upvotes: 1

onlyphantom
onlyphantom

Reputation: 9583

The short answer of why it happened on a Windows system is that you have "C:\Program Files" and R didn't play well with that 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()

The solution:

Try uninstalling and reinstalling R, this time into a brand-new directory tree (not under \Program Files).

This I understand is not the fault of the user, and there is an ongoing issue thread on the package but what I suggested above would be the quick fix you need.

Upvotes: 2

Related Questions