3 回答

TA貢獻(xiàn)1995條經(jīng)驗(yàn) 獲得超2個(gè)贊
ipython
Anaconda>=4.1.0
nb_conda_kernels
conda create -n py27 python=2.7 ipykernel conda create -n py36 python=3.6 ipykernel
手動(dòng)注冊(cè)內(nèi)核
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貢獻(xiàn)1824條經(jīng)驗(yàn) 獲得超6個(gè)贊
細(xì)節(jié)
創(chuàng)建以下目錄: mkdir -p ~/.ipython/kernels/python3
創(chuàng)建此文件 ~/.ipython/kernels/python3/kernel.json
有了這個(gè)內(nèi)容: { "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" }}
重新啟動(dòng)筆記本服務(wù)器。 從下拉菜單“New”中選擇“Python 3” 使用Python 3筆記本 從下拉菜單“New”中選擇“Python 2” 使用Python 2筆記本
添加回答
舉報(bào)