gpt4 book ai didi

python - 打开python文件时如何修复Jupyter扩展激活失败?

转载 作者:行者123 更新时间:2023-12-05 08:24:54 27 4
gpt4 key购买 nike

我最近在我的 macos 系统上安装了 python,当我尝试打开一个 python 文件时,我看到这个关于 Jupyter 扩展的错误弹出窗口: enter image description here

最佳答案

我遇到了同样的问题,终于解决了!


如果您使用的是 Linux 并且正在使用支持 AUR 的基于 Arch 的发行版,只需使用以下方法安装 code-features 包:

yay -S code-features

或您选择的任何 AUR 助手。


在其他操作系统上,您应该执行以下操作:

打开 VSCode 的 product.json。我不知道这个文件在你的操作系统上的什么位置,所以请做一些研究。

查找以下行:

"extensionAllowedProposedApi": [ ...

将以下条目添加到该数组:

"ms-toolsai.jupyter": ["notebookConcatTextDocument", 
"notebookControllerKind", "notebookDebugOptions", "notebookDeprecated",
"notebookEditor", "notebookEditorDecorationType", "notebookEditorEdit",
"notebookMessaging", "notebookMime", "notebookCellExecutionState",
"portsAttributes", "textDocumentNotebook", "quickPickSortByLabel"]

例如,如果该行最初是:

"extensionAllowedProposedApi": [ "extension1", "extension2" ]

然后将其更改为:

"extensionAllowedProposedApi": [ "extension1", "extension2", 
"ms-toolsai.jupyter": ["notebookConcatTextDocument",
"notebookControllerKind", "notebookDebugOptions", "notebookDeprecated",
"notebookEditor", "notebookEditorDecorationType", "notebookEditorEdit",
"notebookMessaging", "notebookMime", "notebookCellExecutionState",
"portsAttributes", "textDocumentNotebook", "quickPickSortByLabel"] ]

请注意,使用第二种方法,每次更新 VSCode 时都需要编辑 product.json

关于python - 打开python文件时如何修复Jupyter扩展激活失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69808514/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com