3 回答
TA贡献1995条经验 获得超2个赞
ipython
Anaconda>=4.1.0
nb_conda_kernels
conda create -n py27 python=2.7 ipykernel conda create -n py36 python=3.6 ipykernel
手动注册内核
nb_conda_kernels
python2.7
conda create -n py27 python=2.7conda activate py27 conda install notebook ipykernel ipython kernel install --user
python3.6
conda create -n py36 python=3.6conda activate py36 conda install notebook ipykernel ipython kernel install --user
python2
python3
--name
--display-name
ipython kernel install
ipython kernel install --help
TA贡献1824条经验 获得超6个赞
细节
创建以下目录: mkdir -p ~/.ipython/kernels/python3
创建此文件 ~/.ipython/kernels/python3/kernel.json
有了这个内容: { "display_name": "IPython (Python 3)", "language": "python", "argv": [ "python3", "-c", "from IPython.kernel.zmq.kernelapp import main; main()", "-f", "{connection_file}" ], "codemirror_mode": { "version": 2, "name": "ipython" }}
重新启动笔记本服务器。 从下拉菜单“New”中选择“Python 3” 使用Python 3笔记本 从下拉菜单“New”中选择“Python 2” 使用Python 2笔记本
添加回答
举报