简体   繁体   中英

VSCode Intellisense works when editing a python file but does not work in Jupyter Notebook

I'm using VSCode on a Windows 10 OS. The Intellisense feature works fine when I'm editing a Python file (eg when I type 'imp' the editor recommends 'import'), but not when editing a Jupyter notebook within the same VSCode session.

I have tried starting a fresh session, and switching to multiple different interpreters, but the above scenario keeps happening. VSCode's website states that Jupyter Notebook editors have full IntelliSense support.

UPDATE

I disabled and uninstalled a language support extension called Pylance and now the Intellisense works on some notebook kernels (eg it works in a Python 3.8.0 kernel but not a Python 3.6.5 kernel). Still works just fine in regular *.py files.

When I use the " Microsoft " language service, Jupyter in VS Code has "Intellisense":

在此处输入图像描述

When I use the " Pylance " language service, Jupyter in VS Code has "Intellisense":

在此处输入图像描述

As for "Intellisense" in VSCode's website, this problem is currently being fixed. Github link: IntelliSense is not working in Jupyter Notebook editor .

Here is a workaround and you could refer to it:

It is recommended that you use " Visual Studio Code Insiders ", which has rich "Intellisense" in Jupyter:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM