プログラミング

【Mac】jupyter notebookのディレクトリ変更方法

-プログラミング

jupyter_notebook_config.pを取得

以下コマンドを実行

 jupyter notebook --generate-config

~.jupyter/jupyter_notebook_config.pyが作成される

jupyter_notebook_config.pyを編集

jupyter_notebook_config.pyを開く
vi ~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.notebook_dirを置換

コマンドモードで

 /c.NotebookApp.notebook_dir

# c.NotebookApp.notebook_dir = ''

c.NotebookApp.notebook_dir = '{任意のディレクトリ}'
に書き換える

例) c.NotebookApp.notebook_dir = '/Users/jupyter'

jupyter notebookを開きディレクトリが指定したディレクトリになっているかを確認する。

-プログラミング