LoginSignup
15
6

More than 5 years have passed since last update.

Jupyter notebook 5.7.0 と `~/.jupyter/jupyter_notebook_config.py` で Jupyter notebook が起動しないバグ

Posted at

先日書いた Jupytext をリモートインスタンスにも入れようとしたら Jupyter notebook が起動しなくなったのでメモ。

背景

Jupyter notebook のバージョンが 5.7.0 で、かつ ~/.jupyter/jupyter_notebook_config.py に下記の設定が入っていると、 Jupyter notebook が起動しない。

$ jupyter notebook --version
5.7.0
~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.ip = '*'

起動しようとすると、次のようなエラーになる。 (Traceback は最後以外消してます)

Traceback (most recent call last):
# 中略
KeyError: 'allow_remote_access'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
# 中略
ValueError: '' does not appear to be an IPv4 or IPv6 address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
# 中略
socket.gaierror: [Errno -2] Name or service not known

解決策

その1: バージョンを戻す

# pipenv
$ pipenv install notebook==5.6.0
# pip
$ pip install notebook 'notebook==5.6.0'

その2: 設定を変える

+ c.NotebookApp.ip = '0.0.0.0'
- c.NotebookApp.ip = '*'

関連 (原因)

ValueError: '' does not appear to be an IPv4 or IPv6 address

とりあえず困ってないのでバージョンを戻して運用。
そのうち直りそう。

15
6
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
15
6