问题
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