JupyterLab 坏了

JupyterLab is Broken

我最近刚刚在 conda 中执行了一次更新。从那以后我无法启动Jupyterlab;试图在 Jupyterlab 上进行额外的更新,但没有成功。我收到以下错误并且没有想法。非常感谢任何帮助。

c:\users\ncosgrov\anaconda3\envs\atoti\lib\site-packages\jupyter_server\transutils.py:13: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
  warnings.warn(warn_msg, FutureWarning)
[I 2021-06-24 15:03:02.323 ServerApp] jupyter_server_mathjax | extension was successfully linked.
[I 2021-06-24 15:03:02.333 ServerApp] jupyterlab | extension was successfully linked.
[I 2021-06-24 15:03:02.333 ServerApp] jupyterlab_git | extension was successfully linked.
[W 2021-06-24 15:03:02.364 ServerApp] The 'min_open_files_limit' trait of a ServerApp instance expected an int, not the NoneType None.
Traceback (most recent call last):
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\ncosgrov\Anaconda3\envs\atoti\Scripts\jupyter-lab.EXE\__main__.py", line 7, in <module>
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\site-packages\jupyter_server\extension\application.py", line 518, in launch_instance
    serverapp = cls.initialize_server(argv=args)
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\site-packages\jupyter_server\extension\application.py", line 491, in initialize_server
    find_extensions=find_extensions,
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\site-packages\traitlets\config\application.py", line 87, in inner
    return method(app, *args, **kwargs)
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\site-packages\jupyter_server\serverapp.py", line 1872, in initialize
    self.init_server_extensions()
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\site-packages\jupyter_server\serverapp.py", line 1698, in init_server_extensions
    self.extension_manager.link_all_extensions(self)
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\site-packages\jupyter_server\extension\manager.py", line 359, in link_all_extensions
    self.link_extension(name, serverapp)
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\site-packages\jupyter_server\extension\manager.py", line 332, in link_extension
    extension = self.extensions[name]
  File "c:\users\ncosgrov\anaconda3\envs\atoti\lib\site-packages\nbclassic\nbserver.py", line 80, in extensions
    nb = self._extensions.get("nbclassic")
AttributeError: 'ExtensionManager' object has no attribute '_extensions'

您有一个过时的 nbclassic 版本,它不适用于最新的 jupyter_server。升级到 0.2.8 或更新版本:

conda install "nbclassic>=0.2.8" -c conda-forge

或者如果使用 pip:

pip install -U "nbclassic>=0.2.8"

如果您不使用 nbclassic,您也可以通过以下方式禁用它:

jupyter server extension disable nbclassic

相关GitHub issue中有更多信息。