Cannot install IRkernel with install_github(): Git not installed?

旧时模样 提交于 2019-11-30 21:14:26

Thought I would chime in here. I had the exact same problem. I came across this post...https://github.com/IRkernel/IRkernel/issues/594 where Flying Sheep simply states to install git. So went to https://git-scm.com/ and downloaded and installed, then ran the instructions https://irkernel.github.io/installation/ and everything worked. Now using R in Jupyter Nb.

Here a way to overcome this problem. I have installed IRkernel with anaconda in my mac (I guess is the same on Linux and Windows) I typed:

conda install -c r r-irkernel

Then I started started R from terminal by typing:

R

Finally, I have install the kernelspec to tell Jupyter about IRkernel, with the option user=FALSE for installation in the global environment:

IRkernel::installspec(user=FALSE)

Hope it helps!

I had the same problem on Windows 7 and found older versions of devtools package work out. I downloaded devtools_1.13.4.tar.gz(didn't test others) from https://cran.r-project.org/src/contrib/Archive/devtools/,and did as follows:

  1. install devtools_1.13.4.tar.gz from local:

    go into R, click on Packages (at the top of the R console), then click on "Install package(s) from local zip files" and install the devtools_1.13.4.tar.gz, an ERROR message shows which dependencies are in need, for me, the message was :

    ERROR: dependencies 'httr', 'memoise', 'whisker', 'digest', 'rstudioapi', 'jsonlite', 'git2r', 'withr' are not available for package 'devtools'.

  2. install these dependecies:

    install.packages(c('httr', 'memoise', 'whisker', 'digest', 'rstudioapi', 'jsonlite', 'git2r', 'withr'))
    
  3. reinstall devtools_1.13.4.tar.gz from local;
  4. execute:

    library('devtools')
    install_github('IRkernel/IRkernel')
    IRkernel::installspec()
    

If message shows up like:

Error in IRkernel::installspec():jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127.

run R.exe from within Anaconda prompt,and execute:

IRkernel::installspec()  

and everything worked.

i combined the two of the solutions given above and that worked for me , from R console none were working, now it is working so thanks to the two above contributors.

1- go in anaconda prompt and runconda install -c r r-irkernel

2- Now in anaconda prompt type R.exe

3- now run this command IRkernel::installspec()

and it worked`

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!