jupyter-client has to be installed but “jupyter ke

2019-02-02 07:06发布

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.

To do so I followed IRkernel installation link and run below commands:

install.packages('devtools')

devtools::install_github('IRkernel/IRkernel')

But when I run IRkernel::installspec() command it shows below error:

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

I am now confused why this error occurs.

10条回答
贪生不怕死
2楼-- · 2019-02-02 07:43

Running this command from RStudio will show this error. When you run this command from command line/ terminal then everything will be fine.

So just type R from your command line.

Then Run below commands:

install.packages('devtools')

devtools::install_github('IRkernel/IRkernel')

IRkernel::installspec()
查看更多
等我变得足够好
3楼-- · 2019-02-02 07:45

I have solved with this:

sudo ln -s /home/'my user name'/anaconda3/bin/jupyter /usr/bin/jupyter

查看更多
唯我独甜
4楼-- · 2019-02-02 07:46

I had the same issue; I added the following in the ~/.bashrc (and source) and then tried running IRkernel::installspec() and it worked:

export PATH="~/anaconda3/bin:$PATH"
查看更多
时光不老,我们不散
5楼-- · 2019-02-02 07:50

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

查看更多
手持菜刀,她持情操
6楼-- · 2019-02-02 07:53

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.

查看更多
小情绪 Triste *
7楼-- · 2019-02-02 07:56

On some Windows systems you may not succeed even if you run R from cmd / powershell. That's the case on my machine. My workaround is to run R from Anaconda Prompt (if you installed Jupyter via Anaconda). You may need to specify the full path if R is not on your PATH.

I think this is some problem related to the PATH, however I had no luck adding Anaconda\Lib\site-packages\jupyter_client to my system PATH.

查看更多
登录 后发表回答