gpt4 book ai didi

jupyter-notebook - 启动 Jupyter Lab 时出现语言服务器规范查找器错误

转载 作者:行者123 更新时间:2023-12-04 15:37:01 25 4
gpt4 key购买 nike

我只想了解下面发生的事情。我正在使用 MacOs,最近从 bash 切换到 zsh。然后我安装了 jupyterlab-lsp。可以请教一下吗?


[W 14:27:11.102 LabApp] Failed to fetch commands from language server spec finder`bash-language-server`:
expected str, bytes or os.PathLike object, not tuple
[W 14:27:11.108 LabApp] Failed to fetch commands from language server spec finder`dockerfile-language-server-nodejs`:
expected str, bytes or os.PathLike object, not tuple
[W 14:27:11.113 LabApp] Failed to fetch commands from language server spec finder`javascript-typescript-langserver`:
expected str, bytes or os.PathLike object, not tuple
[W 14:27:11.125 LabApp] Failed to fetch commands from language server spec finder`unified-language-server`:
expected str, bytes or os.PathLike object, not tuple
[W 14:27:11.129 LabApp] Failed to fetch commands from language server spec finder`vscode-css-languageserver-bin`:
expected str, bytes or os.PathLike object, not tuple
[W 14:27:11.133 LabApp] Failed to fetch commands from language server spec finder`vscode-html-languageserver-bin`:
expected str, bytes or os.PathLike object, not tuple
[W 14:27:11.138 LabApp] Failed to fetch commands from language server spec finder`vscode-json-languageserver-bin`:
expected str, bytes or os.PathLike object, not tuple
[W 14:27:11.142 LabApp] Failed to fetch commands from language server spec finder`yaml-language-server`:
expected str, bytes or os.PathLike object, not tuple
[I 14:27:11.193 LabApp] JupyterLab extension loaded from /Users/emilolbinado/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 14:27:11.193 LabApp] JupyterLab application directory is /Users/emilolbinado/anaconda3/share/jupyter/lab
[I 14:27:11.195 LabApp] Serving notebooks from local directory: /Users/emilolbinado
[I 14:27:11.195 LabApp] The Jupyter Notebook is running at:
[I 14:27:11.195 LabApp] http://localhost:8888/?token=95a48a55a6638a48cbfa24c95106903144ffaafe10a65652
[I 14:27:11.195 LabApp] or http://127.0.0.1:8888/?token=95a48a55a6638a48cbfa24c95106903144ffaafe10a65652
[I 14:27:11.195 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:27:11.202 LabApp]

To access the notebook, open this file in a browser:
file:///Users/emilolbinado/Library/Jupyter/runtime/nbserver-8098-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=95a48a55a6638a48cbfa24c95106903144ffaafe10a65652
or http://127.0.0.1:8888/?token=95a48a55a6638a48cbfa24c95106903144ffaafe10a65652
Opening in existing browser session.
[I 14:27:14.645 LabApp] Build is up to date
[I 14:27:21.183 LabApp] Kernel started: 5c355536-12b0-41de-8c81-cc2afef6a85c
[I 14:27:21.218 LabApp] Kernel started: 9505d56b-0f5a-43f4-970e-990fa0852522

最佳答案

问题是因为 jupyter 服务器无法找到语言服务器。就我而言,jupyter 是使用/opt/miniconda3/下的 conda 环境(miniconda)安装和维护的,而我的 nodejs 位于/usr/local/下。理想情况下,如果您已经在使用 conda 管理器,您将希望完全卸载 nodejs 并使用 conda 重新安装它。否则,删除整个 anaconda/conda,然后使用 pip 或 brew 重新安装 python ( https://www.python.org/downloads/release/python-381/ ) 和 jupyter,具体取决于您安装 nodejs 的方式/位置。

我能够按照以下步骤解决我的问题:

1.) 完全卸载node js。我能够通过运行 nvm uninstall <version> 来做到这一点或者,如果您使用的是自制软件,请运行 brew uninstall node然后 rm -f /usr/local/bin/npm在终端上。此外,您可以按照以下引用:How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)

2.) 重新安装 nodejs。 conda install -c conda-forge nodejs

3.) 安装语言服务器。请参阅引用资料:https://github.com/krassowski/jupyterlab-lsp/blob/master/LANGUAGESERVERS.md#installing-language-servers

4.) 重启终端并运行 jupyter lab。

现在这是我所拥有的能够解决我的问题的最佳答案。

关于jupyter-notebook - 启动 Jupyter Lab 时出现语言服务器规范查找器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59386899/

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