2023年7月3日发(作者:)
升级到jupyterlab3之后原来的password⽆法登陆解决⽅法1. jupyter-lab 2使⽤jupyter_notebook_配置⽂件进⾏密码设置的操作为:/opt/pyenvs/envtf22/bin/ipythonPython 3.6.8 (default, Nov 16 2020, 16:55:22)Type 'copyright', 'credits' or 'license' for more informationIPython 7.16.1 -- An enhanced Interactive Python. Type '?' for [3]: from import passwd; passwd("heheda")Out[3]: 'argon2:$argon2id$v=19$m=10240,t=10,p=8$Ktjc9LqcZ7WxFPcjp8SFlQ$oKAMhUstb80LAsEFROzD9A'vim jupyter_notebook_# 将 rd = 'argon2:$argon2id$v=19$m=10240,t=10,p=8$Ktjc9LqcZ7WxFPcjp8SFlQ$oKAMhUstb80LAsEFROzD9A'# 加⼊jupyter_notebook_中# 启动jupyter-labnohup /opt/pyenvs/envtf22/bin/jupyter-lab --config='./jupyter/jupyter_notebook_' &>./jupyter_lab_ &2. 当升级到jupyter-lab3之后,发现使⽤原来的jupyter_notebook_配置⽂件进⾏启动时会有⼀些告警,并且使⽤密码⽆法登陆,同时⼜没有token在启动⽇志中打印。[W 2021-03-03 13:16:31.025 LabApp] 'allow_root' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config
[W 2021-03-03 13:16:31.026 LabApp] 'ip' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next[W 2021-03-03 13:16:31.026 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config befo[W 2021-03-03 13:16:31.026 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config befo[W 2021-03-03 13:16:31.026 LabApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before
[W 2021-03-03 13:16:31.026 LabApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our ne[W 2021-03-03 13:16:31.037 ServerApp] notebook_dir is deprecated, use root_dir[I 2021-03-03 13:16:31.037 ServerApp] jupyterlab | extension was successfully linked.[I 2021-03-03 13:16:31.500 ServerApp] nbclassic | extension was successfully linked.[W 2021-03-03 13:16:31.542 ServerApp] WARNING: The Jupyter server is listening on all IP addresses and not using encryption. This is not recommended.[I 2021-03-03 13:16:31.549 LabApp] JupyterLab extension loaded from /opt/pyenvs/envtf22/lib/python3.6/site-packages/jupyterlab[I 2021-03-03 13:16:31.549 LabApp] JupyterLab application directory is /opt/pyenvs/envtf22/share/jupyter/lab[I 2021-03-03 13:16:31.555 ServerApp] jupyterlab | extension was successfully loaded.[I 2021-03-03 13:16:31.561 ServerApp] nbclassic | extension was successfully loaded.[I 2021-03-03 13:16:31.561 ServerApp] 启动notebooks 在本地路径: /home[I 2021-03-03 13:16:31.562 ServerApp] Jupyter Server 1.4.1 is running at:[I 2021-03-03 13:16:31.562 ServerApp] bg1:1288/lab[I 2021-03-03 13:16:31.562 ServerApp] or 127.0.0.1:1288/lab[I 2021-03-03 13:16:31.562 ServerApp] 使⽤control-c停⽌此服务器并关闭所有内核(两次跳过确认).[W 2021-03-03 13:16:31.570 ServerApp] 没有找到web浏览器: could not locate runnable browser.[I 2021-03-03 13:16:48.118 LabApp] 302 GET /lab (192.168.10.97) 2.26ms[W 2021-03-03 13:16:51.500 ServerApp] 401 POST /login?next=%2Flab (192.168.10.97) 3.18ms referer=192.168.0.15:1288/login?next=%2Flab[W 2021-03-03 13:17:08.944 ServerApp] 401 POST /login?next=%2Flab (192.168.10.97) 3.24ms referer=192.168.0.15:1288/login?next=%2Flabimage3. 解决⽅法# 将配置⽂件中使⽤到的.NotebookApp修改为.ServerApp,如:# 将 _browser = False 修改为:_browser = False4. 这只能解决告警问题,永久修改密码并保存到配置⽂件中,还需要继续以下操作:# shell中输⼊jupyter-lab password,设置jupyter-lab密码jupyter-lab passwordimagecat /root/.jupyter/jupyter_server_{ "ServerApp": { "password": "sha1:7f28388e8a7b:ebc342bc6d7eefed08912d7edf6d364751c97c41" }}将 rd = "sha1:7f28388e8a7b:ebc342bc6d7eefed08912d7edf6d364751c97c41"替换jupyter_notebook_中原来的密码配置。5. 启动jupyter-lab3nohup /opt/pyenvs/envtf22/bin/jupyter-lab --config='./jupyter/jupyter_notebook_' &>./jupyter_lab_ &6. 查看启动⽇志tail -100 ./jupyter_lab_[W 2021-03-03 13:02:01.421 ServerApp] notebook_dir is deprecated, use root_dir[I 2021-03-03 13:02:01.454 ServerApp] jupyterlab | extension was successfully linked.[I 2021-03-03 13:02:01.904 ServerApp] nbclassic | extension was successfully linked.[W 2021-03-03 13:02:01.947 ServerApp] WARNING: The Jupyter server is listening on all IP addresses and not using encryption. This is not recommended.[I 2021-03-03 13:02:01.953 LabApp] JupyterLab extension loaded from /opt/pyenvs/envtf22/lib/python3.6/site-packages/jupyterlab[I 2021-03-03 13:02:01.953 LabApp] JupyterLab application directory is /opt/pyenvs/envtf22/share/jupyter/lab[I 2021-03-03 13:02:01.960 ServerApp] jupyterlab | extension was successfully loaded.[I 2021-03-03 13:02:01.967 ServerApp] nbclassic | extension was successfully loaded.[I 2021-03-03 13:02:01.967 ServerApp] 启动notebooks 在本地路径: /home[I 2021-03-03 13:02:01.967 ServerApp] Jupyter Server 1.4.1 is running at:[I 2021-03-03 13:02:01.967 ServerApp] bg1:1207/lab[I 2021-03-03 13:02:01.967 ServerApp] or 127.0.0.1:1207/lab[I 2021-03-03 13:02:01.967 ServerApp] 使⽤control-c停⽌此服务器并关闭所有内核(两次跳过确认).[W 2021-03-03 13:02:01.976 ServerApp] 没有找到web浏览器: could not locate runnable browser.[I 2021-03-03 13:02:10.521 ServerApp] 302 POST /login?next=%2Flab%3F (192.168.10.97) 5.75ms[I 2021-03-03 13:02:15.620 LabApp] Build is up to date[I 2021-03-03 13:02:47.500 ServerApp] Kernel started: 368e649f-5429-476b-a21c-f03521d55c29[I 2021-03-03 13:03:35.396 LabApp] 302 GET /lab (192.168.10.97) 1.97ms[I 2021-03-03 13:03:42.776 ServerApp] 302 POST /login?next=%2Flab (192.168.10.97) 3.18ms[I 2021-03-03 13:03:47.905 LabApp] Build is up to date[I 2021-03-03 13:44:04.531 ServerApp] Starting buffering for 368e649f-5429-476b-a21c-f03521d55c29:dd931da2-18ce-43f4-96c3-03fffdba796a[I 2021-03-03 13:44:08.759 LabApp] Build is up to
发布者:admin,转转请注明出处:http://www.yc00.com/news/1688383445a129826.html
评论列表(0条)