在Jupyter Notebook安装中使用R [英] Using R with Jupyter notebook installation

查看:221
本文介绍了在Jupyter Notebook安装中使用R的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从官方站点安装了R,并且想从jupyter笔记本和jupyterlab中使用它.为此,我使用以下命令在R中安装了IRkernal:

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')

,然后当我键入IRkernel::installspec(user = FALSE)使该安装在全局可见时, 我收到以下错误:

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

我在miniconda上安装了jupyter,并且我不想使用R的conda发行版.我该怎么办?

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

推荐答案

设置IRkernel的命令必须在与jupyter安装相同的环境中运行.因此,它不能直接与R.exe一起使用.为此,您必须在Anaconda提示符下运行命令IRkernel::installspec(user=False) .

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.

这篇关于在Jupyter Notebook安装中使用R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆