Conda安装R环境并在Jupyter Lab中运行

说明:

Conda 安装 R 环境,并在 Jupyter Lab 中运行 R 脚本。

1. 创建环境并安装r-base

创建环境:conda create -n [环境名]
激活环境:conda activate [环境名]
安装 Jupyter Lab:conda install -c conda-forge jupyterlab
安装r-base:conda install r-base=4.4.1(R版本为4.4.1)

2. 安装 R 内核

进入 R 交互环境后,安装:
安装必要的包:install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
安装 IRkernel: install.packages("IRkernel")
Jupyter Lab 连接 IRkernel:IRkernel::installspec()
修改Jupyter Lab中显示的R环境名称:
jupyter kernelspec list 列出所有内核,找到 [环境名] 对应的 json 文件,修改其中的"display_name": "待显示的环境名称"

显示的默认环境名称为R

修改 json 后环境的名称:

参考:

1\]. https://blog.csdn.net/weixin_45348389/article/details/108359814 \[2\]. https://blog.csdn.net/guoyuzhu_2013/article/details/106604447

相关推荐
Volunteer Technology8 小时前
Centos7安装python和jupyter
linux·python·jupyter
资源存储库1 天前
【笔记】如何修改一个conda环境的python版本?
笔记·python·conda
weixin_440401691 天前
Win11 系统 Anaconda 下载+conda命令+Jupyter Notebook+VS Code
ide·python·jupyter·conda
weixin_462446231 天前
【原创实践】在 CentOS 上安装 JupyterHub 并配置 R 语言支持 Kernel
linux·r语言·centos
2501_941322032 天前
道路检测新突破:Cascade R-CNN在COCO数据集上的实战应用详解
开发语言·r语言·cnn
高-老师2 天前
基于R语言生物信息学大数据分析与绘图实践技术应用
开发语言·数据分析·r语言·生物信息
Stream_Silver2 天前
解决PyCharm配置Conda虚拟环境报错lateinit property envs has not been initialized的问题
ide·pycharm·conda
czliutz2 天前
R语言gm音乐包的使用简单介绍
开发语言·r语言·音乐·技巧
asyxchenchong8882 天前
R语言+贝叶斯网络:涵盖贝叶斯网络基础、离散与连续分布、混合网络、动态网络,Gephi可视化
r语言
70asunflower2 天前
Jupyter Notebook 详细快捷键操作指南
ide·python·jupyter