自分用メモ
仮想環境使ってkernelの追加方法
MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
プロセッサ 2.5GHz Intel Core i7
メモリ 8GB 2133 MHz LPDDR3
実環境でAnacondaが入っている前提で
https://www.anaconda.com/download/
#Jupyter Notebookで使えるカーネルの確認
$ jupyter kernelspec list
python2 /Users/(ユーザ名)/anaconda2/share/jupyter/kernels/python2
#python2系のkernelを追加するとき
$ conda create -n py27 python=2.7 notebook ipykernel
$ source activate py27
$ ipython kernel install --user
カーネルの情報は/Users/(ユーザ名)/Library/Jupyter/kernels/python2/kernel.jsonにある
$ cat /Users/(ユーザ名)/Library/Jupyter/kernels/python2/kernel.json
{
"display_name": "Python 2",
"language": "python",
"argv": [
"/Users/(ユーザ名)/anaconda2/envs/py27/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
]
#python3系のkernelを追加するとき
$ conda create -n py36 python=3.6 notebook ipykernel
$ source activate py36
$ ipython kernel install --user
kernelの情報は上と同様
#Jupyter Notebookで使えるカーネルの再確認
$ jupyter kernelspec list
python2 /Users/(ユーザ名)/Library/Jupyter/kernels/python2
python3 /Users/(ユーザ名)/Library/Jupyter/kernels/python3
#Jupyter Notebookの起動
$ jupyter notebook