问题描述
我在Anconda里有两个环境,在安装新环境的jupyter notebook,在打开jupyter notebook后出现403的现象。以下是终端中出现的问题:
py:608: UserWarning: The Tornado web application does not have an 'identity_provider' defined in its settings. In future releases of jupyter_server, this will be a required key for all subclasses of `JupyterHandler`.
For an example, see the jupyter_server source code for how to add an identity provider to the tornado settings: https://github.com/jupyter-=server/jupyter_server/blob/v2.0.0/jupyter_server/serverapp.py#L242;
最后出现
tornado.web.HTTPError: HTTP 403: Forbidden
原因分析:
我安装的notebook 6
,在安装的过程中,同时安装相关依赖包Jupyter Server
。(这里很奇怪,我之前老环境中的notebook 6
安装时,没有安装Jupyter Server
依赖包)。经过conda list查询发现,安装的Jupyter Server
版本为2
,Jupyter Server 2
和notebook 6
不兼容。所以需要将Jupyter Server 2
降级。
解决方案:
将Jupyter Server
降级到小于2的版本,可以参考以下代码:
pip install jupyter-server==1.13.4