背景:
mac ox10.11
已安裝anaconda3和3下的jupyter notebook吟榴,打開(kāi)jn只能看到py3一個(gè)kernel嫡丙。
希望在jupiter notebook中再添加python2的kernel猜谚。
1.配置python2的環(huán)境
conda create -n python27 python=2.7
2.成功以后通過(guò)python2.7的ipykernel在jupiter notebook中添加kernel
#激活py2的環(huán)境
source activate python27
#在python2環(huán)境下安裝ipykernel
conda install notebook ipykernel
#在jupiter notebook中添加新kernel麻献,命名為python2
python27 -m ipykernel install --name python2
參考
https://ipython.readthedocs.io/en/latest/install/kernel_install.html#kernels-for-python-2-and-3