Jupyter Notebook 错误:“未找到 Jupyter 命令 `jupyter-notebook`。”

use*_*366 13 jupyter visual-studio-code jupyter-notebook

在此输入图像描述

我刚刚使用 homebrew 下载了 vscode 并使用 homebrew 安装了 python@3.11 。我使用 pip3 install jupyter 因为我看到其他建议来解决这个问题,但仍然没有运气。我已经下载了 vscode 上的所有扩展,并将内核设置为 python 的自制版本,但仍然收到此问题。请注意,我过去使用过笔记本电脑,但从未遇到过这个问题,所以我不太确定这次是什么问题。我还没有安装anaconda。

我尝试过卸载和安装扩展,但没有成功。我尝试过 pip3 卸载 jupyter、pip3 卸载笔记本并重新安装它们,但仍然没有成功。我尝试将 mac 上的内核更改为默认的 python3,但仍然没有效果。我的 Mac 是 m1,运行 Ventura 13.2。我可以在常规 python 文件上运行 python 代码,只是不使用 jupyter 笔记本。我按照 vscode 网站上的说明进行设置,但出现此错误。

Tim*_*ong 17

我在 Mac OS 上使用 VSCode 时遇到同样的问题。

\n

VSCode 的“Jupyter”插件已损坏,导致 VSCode 无法与 python 解释器绑定。v2023.1.2000312134从\xc2\xa0降级v2022.11.1003412109以解决我的问题。

\n

降级到之前的版本

\n

  • 此处跟踪版本“v2023.1.2000312134”中发现的错误:https://github.com/microsoft/vscode-jupyter/issues/12726 (4认同)

小智 8

我有同样的问题,在 m1 mac (Ventura 13.2) 上运行。如果您还没有,请确保您正在使用 python 虚拟环境:

# Create a python virtual environment
$ python -m venv venv
# Activate your python virtual environment
$ source venv/bin/activate
Run Code Online (Sandbox Code Playgroud)

形成 VSCode 命令面板 (Shift+Command+P),搜索然后选择

Jupyter:选择解释器来启动 Jupyter 服务器

然后,您应该选择与您的虚拟环境 (venv) 关联的 python 版本。