jupyter 增加和删除kernel

2019-06-14  本文已影响0人  默写年华Antifragile
  1. 查看当前 jupyter 中有哪些 kernel
jupyter kernelspec list

--------------------------------------------------------------------------------------------

  1. 删除指定 kernel
jupyter kernelspec remove kernel_name

-----------------------------------------------------------------------------------------------

  1. 增加指定 kernel
(pytorch) user-name@406:~$ which python
/home/user-name/anaconda3/envs/pytorch/bin/python
sudo /home/user-name/anaconda3/envs/pytorch/bin/python -m ipykernel install --name XXXX

注意:这里不能直接使用 sudo python 因为这样会对应到默认的python,而不是虚拟环境中的 python,因此直接输入虚拟环境的具体位置

上一篇下一篇

猜你喜欢

热点阅读