首页 > 解决方案 > KeyError:一个环境中的jupyter笔记本中的“allow_remote_access”

问题描述

我可以在不激活环境的情况下运行 jupyter notebook。py35我也可以在我制作的环境下运行。但是当我尝试在下运行它时py36,它失败了

Traceback (most recent call last):
  File "/opt/anaconda3/envs/py36/lib/python3.6/site-packages/traitlets/traitlets.py", line 528, in get
    value = obj._trait_values[self.name]
KeyError: 'allow_remote_access'

During handling of the above exception, another exception occurred:

这无法通过在 ~/.jupyter 中编辑文件来解决,因为它适用于其他环境。

标签: jupyter-notebookconda

解决方案


只需使用正确的 IP 手动传递选项 --ip 而不是 *:

jupyter notebook --ip="0.0.0.0"

或更改您的配置文件

详情:https ://github.com/jupyter/docker-stacks/issues/718


推荐阅读