安装和删除Python Kernel
安装Python Kernel
by Stackoverflow @cle:
创建虚拟环境,然后手动添加ipykernel,
conda create -n py27 python=2.7
conda activate py27
conda install notebook ipykernel
ipython kernel install --user
创建了名称为py27
的Python2.7虚拟环境并添加了kernel。
conda create -n py36 python=3.6
conda activate py36
conda install notebook ipykernel
ipython kernel install --user
以上创建了名称为py36
的Python3.6环境,其余Python版本同理。
删除kernel
jupyter kernelspec list
jupyter kernelspec remove <kernel_name>
参考
Jupyter安装R Kernel
-
参考Using R language with Anaconda,创建R虚拟环境
-
参考https://github.com/IRkernel/IRkernel,安装IRkernel
install.packages("devtools")
devtools::install_github("IRkernel/IRkernel")
IRkernel::installspec(user = FALSE)
Python中调用R
假如只是在Python中调用R,而非是安装相应的R环境,建议使用rpy2
,文档。
conda install rpy2