0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windows10のJupyterNotebookでデフォルト保存ディレクトリを設定する方法

Posted at

Windows10にAnacondaをインストールしてJupyterNotebookを利用する場合に保存先ディレクトリを指定する方法が分かり難い。そもそもWindowsでJupyterNotebook使うな!という気もするけど。。。

1.設定ファイルを作成します

Anaconda Promptを起動して以下を実行

jupyter notebook --generate-config

ファイルが出来る
~/.jupyter/jupyter_notebook_config.py

2.設定ファイルを編集します

\#c.NotebookApp.notebook_dir = ''

こんなのを検索し、行頭のコメント'#'を削除して''の中に希望のディレクトリを記述

c.NotebookApp.notebook_dir='d:/MyNotebook'

3.起動ショートカットを修正

Windowsのスタートメニューから以下のアイテムを探して右クリック。

Jupyter Anaconda(Anaconda3)

「その他…」→「ファイルの場所を開く」
で表示された
「Jupyter Notebook(Anaconda3)」のショートカットをさらに右クリック。
表示されたメニューで「プロパティ」を選択。

リンク先(T):
の中身の文字列の最後にある

"%USERPROFILE%/"

を削除して「OK」または「適用」。

4.JupyterNotebookを起動

ファイルリストが空っぽに!またはd:/MyNotebookの内容に!

終わり。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?