我遇到了同样的问题,终于解决了!
如果您在 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。