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

相关推荐
郑泰科技1 天前
python虚拟环境实践:Conda 环境激活报错及解决
开发语言·python·conda
闻缺陷则喜何志丹1 天前
【二分查找】P9822 [ICPC2020 Shanghai R] Walker【有误差】|普及
开发语言·算法·r语言
xiliuhu1 天前
Mac下使用conda安装PyTorch环境
pytorch·python·macos·conda
Tipriest_2 天前
conda和pip换源指南
conda·pip
qwerasda1238522 天前
【深度学习实战】基于Faster R-CNN的新鲜枣果品质智能检测与分类系统完整实现教程
深度学习·r语言·cnn
Feibo20112 天前
R-3east
开发语言·r语言
麻雀无能为力3 天前
conda使用基础
conda
Tiger Z3 天前
《R for Data Science (2e)》免费中文翻译 (第16章) --- Factors
r语言·编程·数据科学
Studying 开龙wu3 天前
关于Fast R-CNN中提到“共享卷积计算”和“空间金字塔池化”这两个紧密相连、推动目标检测发展的核心概念——解决R-CNN致命问题的钥匙
目标检测·r语言·cnn
liu****3 天前
04_Pandas数据分析入门
python·jupyter·数据挖掘·数据分析·numpy·pandas·python常用工具