I am setting up Jupyter notebook environment from remote server. When I import notebook.auth
it report error like this :
我正在从远程服务器设置Jupyter笔记本电脑环境。当我导入Notebook.auth时,它报告错误如下:
>>> from notebook.auth import passwd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'notebook.auth'
My jupyter parameter are like this :
我的jupyter参数如下所示:
Selected Jupyter core packages...
IPython : 8.2.0
ipykernel : 6.25.0
ipywidgets : 8.1.0
jupyter_client : 8.1.0
jupyter_core : 5.3.0
jupyter_server : 2.7.2
jupyterlab : 4.0.5
nbclient : 0.8.0
nbconvert : 7.2.9
nbformat : 5.9.2
notebook : 7.0.2
qtconsole : 5.4.3
traitlets : 5.7.1
Does anyone know how to fix the problem? I have already tried with pip install jupyter. It doesnot work at all.
有人知道如何解决这个问题吗?我已经尝试了pip安装jupyter。这根本不管用。
Thanks,
谢谢,
更多回答
This must already have happened before, try looking better around at stackoverflow
这肯定以前已经发生过了,尝试在Stackoverflow上更好地查看一下
Is it this from jupyter_server.auth import passwd; passwd()
是否来自jupyter_server.auth导入passwd;passwd()
优秀答案推荐
From Jupyter Notebook 7, use the jupyter_server.auth
module instead of notebook.auth
:
在Jupyter Notebook 7中,使用jupyter_server.auth模块而不是note book.auth:
$ jupyter server password
Enter password: ****
Verify password: ****
[JupyterPasswordApp] Wrote hashed password to /Users/you/.jupyter/jupyter_server_config.json
or ipython:
或IPython:
from jupyter_server.auth import passwd
passwd()
References:
参考资料:
I also have this problem, maybe the notebook 7.0.x have removed the 'auth'. I solved the problem by pip install notebook==6.5.5. I didn't try other visions, it may also work to install 6.x.x.
我也有这个问题,也许笔记本7.0.x去掉了‘auth’。我通过pip安装笔记本==6.5.5解决了这个问题。我没有尝试其他版本,安装6.x.x可能也行。
更多回答
我是一名优秀的程序员,十分优秀!