VSCode中Jupyter Server Not Started | No Kernel 的解决办法

一、前言

    VSCode中最新版的Microsoft Python插件其实已经包含了以前jupyter插件的功能,所以只要安装了Python插件(就是下面这个),理论上是可以打开、编辑、运行 .ipybn类型的文件的。

    然而实际上当我尝试运行ipynb文件的时候,由于VSCode没有办法找到Jupyter Server,会显示如下错误:

    Error: Activating Python 3.7.0 64-bit ('mxnet': venv) to run Jupyter failed with Error: StdErr from ShellExec

    这时就算你在终端启动了jupyter notebook,VSCode仍然显示Jupyter Server Not Started | No Kernel 。

二、解决办法

    (要确保已经安装jupyter notebook, pip install jupyter或者conda install jupyter)

    1.在VSCode 的setting.json文件中加入:"python.terminal.activateEnvironment": false

    2.然后重启VSCode,就会自动开启本地的Jupyter Server,然后你可以按下f1,选择  Python:select interpreter to start jupyter server,选择不同的python编译器。

    成功开启后:

     

 三、参考资料

    https://github.com/microsoft/vscode-python/issues/4013

    如果文章对你有帮助的话,可以点个赞再走哦! 

原创文章 26 获赞 33 访问量 1910

猜你喜欢

转载自blog.csdn.net/qq_40765537/article/details/105495900