最新消息:20210917 已从crifan.com换到crifan.org

【已解决】VSCode中运行Jupyter报错:We encountered an issue downloading the Language Server

VSCode crifan 985浏览 0评论
折腾:
【未解决】VSCode中调试Notebook的ipynb文件中的Python代码
期间,点击运行,结果报错:
We encountered an issue downloading the Language Server. Reverting to the alternative, Jedi. Check the Python output panel for details.
Starting Jupyter server
结果:
Downloading https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-osx-x64.0.5.30.nupkg...
Language server download failed
Error: read ECONNRESET
才看到顶部报错:
Error: Jupyter cannot be started. Error attempting to locate jupyter: at A.startServer (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:1:786120) at async A.ensureServerAndNotebookImpl (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:1:785575) at async A.ensureServerAndNotebook (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:1:785376) at async A.submitCode (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:1:782328) at async A.reexecuteCell (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:75:879318)
关闭notebook,重新打开。
问题依旧:
Error: Jupyter cannot be started. Error attempting to locate jupyter
python – Jupyter notebook not opening in VS Code – Stack Overflow
Can’t run Python code in Visual Studio Code with Jupyter – “Jupyter kernel cannot be started from ‘Python 3.6.8 64-bit” – Stack Overflow
Start a new jupyter notebook command does not work · Issue #4358 · microsoft/vscode-python
Jupyter kernel cannot be started from ‘Python 3.7.0 64-bit (‘env’: venv)’. Using closest match Python 3.7.2 64-bit instead. · Issue #5197 · microsoft/vscode-python
Error Jupyter cannot be started out/client/extension.js
python – jupyter server : not started, no kernel in vs code – Stack Overflow
Jupyter Server: No Kernel Python: Not Started · Issue #9636 · microsoft/vscode-python
VS Code Jupyter Server: No Kernel | Python: Not Started issue : vscode
Jupyter Server: No Kernel Python: Not Started · Issue #9636 · microsoft/vscode-python
试试
“* Please could you open the Jupyter output panel and let us know what’s in there?
* Open the command Select Jupyter Interpreter.. and let us know what currently selected, should be displayed in the picker input as a placeholder. Please select an interpreter that you’d like to use for Jupyter from this list.
* I suspect there are some more errors logged in the console window, possibly with more details, please could you paste your entire log.”
jupter的log中,啥都没有
难道是:此处数据已经显示出来了??
点击重新运行,也不行,卡死了:
没变化
去看看 show jupyter output
也没反应。
不过关闭后,重新打开后,貌似可以了?
好像jupyter的server启动了?
Starting Jupyter from /usr/local/opt/python/bin/python3.7
[I 22:16:28.477 NotebookApp] Writing notebook server cookie secret to /Users/crifan/Library/Jupyter/runtime/notebook_cookie_secret
[I 22:16:29.896 NotebookApp] Serving notebooks from local directory: /var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/e0ad91e0-ffe3-4e64-a92d-abf917a14263
[I 22:16:29.901 NotebookApp] The Jupyter Notebook is running at:
[I 22:16:29.902 NotebookApp] http://localhost:8888/?token=77a70f7dd8e096fd5d5ced16bb43901e0ce3320426c6cfc4
[I 22:16:29.902 NotebookApp]  or http://127.0.0.1:8888/?token=77a70f7dd8e096fd5d5ced16bb43901e0ce3320426c6cfc4
[I 22:16:29.907 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 22:16:29.964 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///Users/crifan/Library/Jupyter/runtime/nbserver-44079-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=77a70f7dd8e096fd5d5ced16bb43901e0ce3320426c6cfc4
     or http://127.0.0.1:8888/?token=77a70f7dd8e096fd5d5ced16bb43901e0ce3320426c6cfc4
[I 22:16:31.910 NotebookApp] Creating new notebook in /
[I 22:16:31.923 NotebookApp] Writing notebook-signing key to /Users/crifan/Library/Jupyter/notebook_secret
[I 22:16:31.998 NotebookApp] Kernel started: b343b980-1f77-4d18-8dcd-03e876cdb7c8
[I 22:16:36.169 NotebookApp] Creating new notebook in /
[I 22:16:36.187 NotebookApp] Kernel shutdown: b343b980-1f77-4d18-8dcd-03e876cdb7c8
[I 22:16:36.623 NotebookApp] Kernel started: be834735-20c3-4515-8d55-beba156dcc76
[I 22:16:37.652 NotebookApp] Creating new notebook in /
[I 22:16:37.662 NotebookApp] Creating new notebook in /
[I 22:16:37.674 NotebookApp] Creating new notebook in /
[I 22:16:37.685 NotebookApp] Creating new notebook in /
[I 22:16:37.719 NotebookApp] Kernel started: e64de3fd-8c30-4f87-bc46-eee10208f1a3
[I 22:16:37.745 NotebookApp] Kernel started: c356a799-1b24-475e-93fe-266b42915bec
[I 22:16:37.775 NotebookApp] Kernel started: eed26f94-14c5-4cbe-ac37-d7c33d8a5277
[I 22:16:37.816 NotebookApp] Kernel started: 878276aa-a24a-475c-92d4-7aae19de69c0
[I 22:16:38.086 NotebookApp] Creating new notebook in /
[I 22:16:38.151 NotebookApp] Kernel started: 9db2c404-c196-486b-9d41-b4335e55d6a3
[I 22:16:40.413 NotebookApp] Creating new notebook in /
[I 22:16:40.470 NotebookApp] Kernel started: 34de8af6-e3a6-4130-a21b-d04dd752ae1b
[I 22:16:40.671 NotebookApp] Creating new notebook in /
[I 22:16:40.760 NotebookApp] Kernel started: b63c3ea7-450c-4d38-936d-310069d74080
[I 22:16:40.813 NotebookApp] Creating new notebook in /
[I 22:16:40.963 NotebookApp] Kernel started: 367a418a-eed1-49c6-9049-cd7df9149482
[I 22:16:41.178 NotebookApp] Creating new notebook in /
[I 22:16:41.247 NotebookApp] Kernel started: 718fe709-7a48-4069-892b-8f6be9aab630
然后点击后,也可以运行了:
此处是报错而已
【总结】
此处问题是:
启动Jupyter但是报错:
We encountered an issue downloading the Language Server. Reverting to the alternative, Jedi. Check the Python output panel for details.
具体错误是:
Error: Jupyter cannot be started. Error attempting to locate jupyter: at A.startServer (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:1:786120) at async A.ensureServerAndNotebookImpl (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:1:785575) at async A.ensureServerAndNotebook (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:1:785376) at async A.submitCode (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:1:782328) at async A.reexecuteCell (/Users/crifan/.vscode/extensions/ms-python.python-2020.2.64397/out/client/extension.js:75:879318)
解决办法:
不清楚。但自己最终的操作是
  • 多次关闭了重新打开ipynb文件
  • 查看-》命令面板-》Python: Select Interpreter to start Jupyter server
  • 查看-》命令面板-》Python: Show Jupyter Output
而无意间解决了问题:
可以正常在Jupyter的终端中看到kernel start的log了。
顶部也可以看到:Jupyter Server: local 和 相关的Python版本。

转载请注明:在路上 » 【已解决】VSCode中运行Jupyter报错:We encountered an issue downloading the Language Server

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
92 queries in 0.197 seconds, using 23.39MB memory