Using R with Jupyter notebook installation

╄→尐↘猪︶ㄣ 提交于 2021-02-10 22:40:12

问题


I have installed R from the official site and want to use it from jupyter notebook and jupyterlab. For that i have installed IRkernal in R using:

install.packages('IRkernel')

and then when I type IRkernel::installspec(user = FALSE) to make this installation visible globally, I get following error:

Error in IRkernel::installspec(user = FALSE) : 
  jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127.
In addition: Warning message:
In system2("jupyter", c("kernelspec", "--version"), FALSE, FALSE) :
  '"jupyter"' not found

I have jupyter installation on miniconda and I don't want to use the conda distribution of R. What should I do?


回答1:


The command to setup IRkernel has to be run in the same environment as the jupyter installation. Due to this, It won't work with R.exe directly. For this, you have to run the command IRkernel::installspec(user=False) in the Anaconda prompt.



来源:https://stackoverflow.com/questions/63463273/using-r-with-jupyter-notebook-installation

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