2
1

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 3 years have passed since last update.

jupyter notebookで NotADirectoryError: [Errno 20] Not a directory: 'xdg-settings'が出たときの対処法

Posted at

実行環境

  • Mac Catalina
  • python=3.8.1
  • jupyter-notebook=6.0.3
  • anacondaの仮想環境を使用

エラーの中身

jupyter notebookを開こうとしたら以下のようなエラーが出た。

......
NotADirectoryError: [Errno 20] Not a directory: 'xdg-settings'

改善方法

  1. エラー文に含まれているwebbrowser.py(絶対パスが書かれてるはず)を開く。
  2. webbrowser.pyの中でxdg-settingsを調べる。(自分の環境では534行目)
  3. そこから少し上(自分の環境では15行上)にあるif sys.platform[:3] == "win":elif sys.platform[:3] == "win":に変更する。
  4. 変更を保存後、再度jupyter notebook を実行すると開けるようになっている!!

参考文献

2
1
1

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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?