VSCode 中没有名为 ipykernel_launcher 的模块

问题描述 投票:0回答:1

我正在尝试使用 VSCode 中的交互式窗口,这需要我安装 ipykernel_launcher。直接的错误信息是

No module named ipykernel_launcher. View Jupyter log for further details.

日志非常长,但对我来说最重要的信息似乎是

[error] Failed to install ipykernel ERROR: Could not find a version that satisfies the requirement ipykernel (from versions: none) ERROR: No matching distribution found for ipykernel

pip 似乎找不到 ipykernel。我自己没有在终端中输入任何命令,上面的日志是我启动交互式窗口,然后在 VSCode 提示我消息“使用‘python_ari’运行单元需要 ipykernel 包。

”时单击“安装”的结果。

当尝试自己使用

pip install ipykernel
时,结果是相同的,终端找不到包。

python pip jupyter
1个回答
0
投票

同事帮我找到了解决方案:

Windows 11 不信任 Python 下载包的来源。 我必须通过向命令添加参数来手动告诉我的系统信任:

pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org

另外,我的venv没有激活。菜鸟错误。

'.\venv\Scripts\activate'
© www.soinside.com 2019 - 2024. All rights reserved.