jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127

后端 未结 17 1949
再見小時候
再見小時候 2020-12-23 20:35

I have already installed Jupyter notebook in my ubuntu 16.04 machine. In jupyter notebook there is by default python installed. Now I want to use R from jupyter notebook.

17条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-23 21:02

    I tried to install IRkernel on my Windows machine. I experienced a similar problem when I ran from within R:

    > IRkernel::installspec(user = FALSE)
    Error in IRkernel::installspec(user = FALSE) : 
      jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 1.
    

    I did not use conda to install Jupyter on my machine, but pip. I have some programmes installed which use python under the hood. It means that I have more than one Python instance on my machine and more Jupyter instances too. To be sure I was referencing the right Jupyter instance, I did this:

    > setwd('C:/usr/lib/Python36-32/Scripts')
    > IRkernel::installspec(user = FALSE)
    [InstallKernelSpec] Installed kernelspec ir in C:\ProgramData\jupyter\kernels\ir
    

    Besides Python, I can now also use R within my notebooks.

提交回复
热议问题