gpt4 book ai didi

python - Jupyter 实验室 "404 : Not Found You are requesting a page that does not exist!"

转载 作者:行者123 更新时间:2023-12-04 03:35:20 67 4
gpt4 key购买 nike

Jupyter Notebook 和 Jupyter Lab 运行良好,直到我更新了软件包并设置了环境。
之后,JupyterLab 3.0 不会打开。它显示 404 和一条错误消息:

[I 18:21:13.532 LabApp] JupyterLab extension loaded from 
C:\Users\Alfonso\AppData\Roaming\Python\Python38\site-packages\jupyterlab
[I 18:21:13.532 LabApp] JupyterLab application directory is C:\Users\Alfonso\AppData\Roaming\Python\share\jupyter\lab
[W 18:21:13.533 LabApp] Error loading server extension jupyterlab
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 2036, in init_server_extensions
func(self)
File "C:\Users\Alfonso\AppData\Roaming\Python\Python38\site-packages\jupyterlab\extension.py", line 226, in load_jupyter_server_extension
add_handlers(web_app, config)
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab_server\handlers.py", line 162, in add_handlers
handlers.append((url_pattern, LabHandler))
AttributeError: 'NotebookWebApplication' object has no attribute 'append'
[I 18:23:27.282 LabApp] Serving notebooks from local directory: C:\Users\Alfonso
[I 18:23:27.282 LabApp] Jupyter Notebook 6.3.0 is running at:
[I 18:23:27.282 LabApp] localhost:8889/…
[I 18:23:27.283 LabApp] or 127.0.0.1:8889/…
[I 18:23:27.283 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 18:23:27.370 LabApp] To access the notebook, open this file in a browser: file:///C:/Users/Alfonso/AppData/Roaming/jupyter/runtime/nbserver-5876-open.html
enter image description here
我更改了浏览器(Firefox 而不是 Chrome),按照另一篇文章( How to solve 404 error of jupyter lab )中的建议进行操作,但都没有奏效。此外,我尝试通过以管理员和用户身份安装来解决该问题。
我想知道是否有不涉及重新安装所有 Anaconda 发行版的解决方案。
已安装版本:
  • jupyterlab 3.0.11
  • jupyterlab_server 2.4.0
  • notebook 6.3.0
  • 最佳答案

    其他人在安装 jupyterlab_serverjupyterlab 版本冲突时遇到了类似的问题(请参阅 issue 146 in jupyterlab_server repository ),但是您的版本很好。仔细一看,问题出在 安装了 的地方:
    回溯包括到两个位置的路径:

  • C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages
  • C:\ProgramData\Anaconda3\lib\site-packages

  • 它表明您可能在不同位置安装了这些包的多个版本(通过 pip 安装在本地 Python 目录中的较新版本,以及通过 conda 安装在 Anaconda3 目录中的旧版本)。因为你系统上的 conda 有更高的优先级,当 JupyterLab(本地安装)尝试导入它的依赖项时,它会从 conda 目录中获取旧版本的 notebookjupyterlab_server,这无法为所欲为。
    解决方案:
  • pip uninstall jupyterlab
  • conda install -c conda-forge jupyterlab

  • 上下文:JupyterLab 3.0 中的基础架构发生了重大变化,这意味着它现在使用 jupyter_serverjupyterlab_server 而不是 notebook 来处理所有后端工作(与内核、文件系统、打开端口等交互)。

    关于python - Jupyter 实验室 "404 : Not Found You are requesting a page that does not exist!",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67013399/

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