折腾:
【未解决】VSCode中调试Notebook的ipynb文件中的Python代码
期间,点击运行,结果报错:
1 | We encountered an issue downloading the Language Server. Reverting to the alternative, Jedi. Check the Python output panel for details. |

Starting Jupyter server

结果:
1 2 3 | 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 |
才看到顶部报错:
1 | 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
Error Jupyter cannot be started out/client/extension.js
试试
“* 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启动了?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 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但是报错:
1 | We encountered an issue downloading the Language Server. Reverting to the alternative, Jedi. Check the Python output panel for details. |
具体错误是:
1 | 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