-
先在virtualenv或者anaconda激活你想要在jupyter notebook中使用的環境
source venv/bin/activate -
確保這個環境中有jupyter notebook已經安裝,沒有安裝的話執行下面這個安裝
pip install notebook -
確認該環境下有jupyter notebook之後,在該環境下執行以下命令(
"kernel-name"可以替換成任意你想要的名字, 記得帶上雙引號)ipython kernel install --name "kernel-name" --user - 然後打開jupyter notebook,隨便打開一個python文件,新的kernel可以在菜單裏的”Kernel -> Change Kernel“裏面找到