给jupyter添加多个python版本的kernel

两种方法:
1.想添加的python版本已存在

(1)通过ipykernel为jupyter添加python环境

activate env_name
python -m ipykernel install --name env_name

(2)关闭python环境

deactivate	#win

(3)重新打开jupyter notebook,可以看到想添加的python版本已存在

2.所需版本不是已有的环境

conda create -n Python27 python=2.7 ipykernel	#在创建环境时为其安装ipykernel

tip:如果想要在创建新版本环境时直接装上其他库,像上面的ipykernel一样直接附在后面就可以。
之后同样是激活环境、添加kernel

参考自:https://zhuanlan.zhihu.com/p/25198543

猜你喜欢

转载自blog.csdn.net/qq_24924689/article/details/82950676
今日推荐