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

后端 未结 17 1748
再見小時候
再見小時候 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:00

    I had the same error, but in my case, I have jupyter installed in a virtual environment, so I had to start R after installing the virtual environment in order for IRkernel::installspec() to succeed.

    0 讨论(0)
  • 2020-12-23 21:01

    For mac users:

    I came across the same problem. You should call IRkernel::installspec(user = FALSE) in the terminal through R. I solved it this way, and I bet you could do the same:

    1. Call R.home() in R console
    2. You shall get [1] "/Library/Frameworks/R.framework/Resources"
    3. Add /bin/R to path nlike this: /Library/Frameworks/R.framework/Resources/bin/R
    4. In terminal, paste this path /Library/Frameworks/R.framework/Resources/bin/Rand enter.
    5. Now you are using R in terminal. CallIRkernel::installspec(user = FALSE) And it shall be solved then.
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-12-23 21:03

    I had the same error but the fix was different:

    Make sure you also have anaconda install on your system! (or at least jupyter) https://conda.io/docs/user-guide/install/index.html

    0 讨论(0)
  • 2020-12-23 21:04

    I had the same problem but none of the above solutions worked for me. I was using Debian 9 with the default versions of python and R. I had to delete installed programs and compile latest versions of both from source. For Python compiling I had to use this configuration https://github.com/sloria/TextBlob/issues/173

    0 讨论(0)
  • 2020-12-23 21:04

    For Windows Users, After installing anaconda, you should restart your system so Anaconda prompt appears on start. After opening Anaconda Prompt enter

    IRkernel::installspec()

    This time it will works since I think restart 'cuz PATH of the system to be upgraded.

    0 讨论(0)
提交回复
热议问题