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

Viewed 1822

I'm using VSCode on a Windows 10 OS. The Intellisense feature works fine when I'm editing a Python file (e.g. 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 (e.g. 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.

1 Answers

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

enter image description here

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

enter image description here

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:

enter image description here

Related