簡體   English   中英

無法啟動 session for jupyter kernel python vscode

[英]Unable to start session for jupyter kernel python vscode

我查看了有關堆棧溢出和 github 的其他問題:

https://github.com/microsoft/vscode-jupyter/issues/728 無法在 VS Code 上啟動 Jupyter notebook

很多人可以運行這個命令:

python -m pip install 'traitlets==4.3.3' --force-reinstall

這將解決 jupyter kernel 未在 vscode 中加載的問題。

我一直在連接到 kernel 時遇到問題,一段時間后我收到一條消息:

Unable to start session for kernel Python 3.7.4 64 bit ('name_of_virtual_environment'). Select another kernel to launch with.

我正在使用帶有 ubuntu 20.04 LTS 的 wsl 2,並且我選擇了正確的 python 解釋器(對於 python 擴展和實際筆記本)。 我也在使用 pyenv 來創建我的虛擬環境。 vscode 版本 1.52.1

任何幫助,將不勝感激。

建議您檢查Jupyter notebook所需的依賴package "ipykernel" 是否已成功安裝在您選擇的python環境中:(" pip show ipykernel ")

在此處輸入圖像描述

參考: VS Code 中的 Jupyter 筆記本

卸載 jupyter 及其依賴項,然后重新安裝它們。

pip uninstall jupyter
pip uninstall jupyter_core
pip uninstall jupyter-client
pip uninstall jupyter-console
pip uninstall jupyterlab_pygments
pip uninstall notebook
pip uninstall qtconsole
pip uninstall nbconvert
pip uninstall nbformat`

重新安裝 jupyter notebook 和插件

pip install jupyter
pip install jupyter_core
pip install jupyter-client
pip install jupyter-console
pip install jupyterlab_pygments
pip install notebook
pip install qtconsole
pip install nbconvert
pip install nbformat

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM