gpt4 book ai didi

centos - 在 jupyterHub 上为 jupyterLab 获取 404

转载 作者:行者123 更新时间:2023-12-04 19:39:57 24 4
gpt4 key购买 nike

所以我试图在生产模式(Centos)下使用 JupyterLab 设置 JupyterHub 服务。为简单起见,我选择了系统用户身份验证 (PAM)。所以现在我有几个用户能够运行单个服务器。问题是我需要设置一个 JupyterLab 才能正常工作。
我做了一切(可能还有更多)jupyterhub 文档告诉我要做的事情:

  • 在系统范围内启用 jupyterlab 扩展 ( jupyter serverextension enable --py jupyterlab --sys-prefix )
  • 添加了所需的配置选项 ( c.Spawner.cmd = ["jupyter-labhub"] )
  • 其他一些没用的东西
    但是 /lab url 仍然返回 404 错误。
    相关控制台输出:
  • Jun 29 14:48:51 jupyter-infra-1 pipenv[11806]: Message: '404 GET /user/nataliya/lab (nataliya@::ffff:127.0.0.1) 57.16ms'                                
    Jun 29 14:48:51 jupyter-infra-1 pipenv[11806]: Arguments: ()
    Jun 29 14:48:51 jupyter-infra-1 pipenv[11806]: --- Logging error ---
    Jun 29 14:48:51 jupyter-infra-1 pipenv[11806]: Traceback (most recent call last): Jun 29 14:48:51 jupyter-infra-1 pipenv[11806]: File "/usr/local/lib64/python3.8/site-packages/tornado/web.py", line 1681, in _execute
    Jun 29 14:48:51 jupyter-infra-1 pipenv[11806]: result = self.prepare()
    Jun 29 14:48:51 jupyter-infra-1 pipenv[11806]: File "/usr/local/lib/python3.8/site-packages/notebook/base/handlers.py", line 697, in prepare
    Jun 29 14:48:51 jupyter-infra-1 pipenv[11806]: raise web.HTTPError(404)
    Jun 29 14:48:51 jupyter-infra-1 pipenv[11806]: tornado.web.HTTPError: HTTP 404: Not Found
    可能与控制台输出无关:
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]:    raise web.HTTPError(404, u'Kernel does not exist: %s' % kernel_id)                                    
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]: tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: d85c98fa-2998-4fb3-85e2-8dc6ecbd093a)
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]: During handling of the above exception, another exception occurred:
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]: Traceback (most recent call last):
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]: File "/usr/lib64/python3.8/logging/__init__.py", line 1081, in emit
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]: msg = self.format(record)
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]: File "/usr/lib64/python3.8/logging/__init__.py", line 925, in format
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]: return fmt.format(record)
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]: File "/usr/local/lib64/python3.8/site-packages/tornado/log.py", line 196, in format
    Jun 29 14:39:36 jupyter-infra-1 pipenv[11806]: formatted = self._fmt % record.__dict__
    我没有任何想法,因此将不胜感激。

    最佳答案

    所以,我通过 pip3 安装 jupyterlab 包来解决这个问题。
    这就是它的样子:

  • 我尝试为具有 /home/jupyterhub/.local/bin/pipenv run jupyter serverextension enable --py jupyterlab --user 的用户启用 jupyterlab
    但那返回我异常:

  • ModuleNotFoundError: No module named 'jupyterlab'I re-checked that my Pipfile.lock includes a jupyterlab extension... and it was!2. I tried to install jupyterlab with the most standart way:

    pip3 install jupyterlab它做了一件事!
    仍然不确定为什么使用 pipenv 安装的 jupyterlab 没有结果。

    关于centos - 在 jupyterHub 上为 jupyterLab 获取 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68185409/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com