1

I am running VS Code (Version 1.52) with extensions Jupyter Notebook (2020.12) and Python (2020.12) on MacOS Catalina.

Context:

I have problems getting Intellisense to work properly in my Jupyter Notebooks in VS Code. Some have had some success with adding these config parameters to the global settings of VS Code:

"python.dataScience.runStartupCommands": [
    "%config IPCompleter.greedy=True",
    "%config IPCompleter.use_jedi = False"
]

I went ahead and added those as well but then had to realize that all settings under python.dataScience are Unknown Configuration Setting. Any idea why this is and how I could this get to work?

2
  • What is the "Intellisense" effect you expect from Jupyter notebook in VSCode? Could you please provide us with a detailed example? Commented Dec 21, 2020 at 9:21
  • @JillCheng basically I was expecting the same IntelliSense support as in standard Python files .py and what is also described here - vscode for jupyter. For example for print() all I am getting is code completion but no further information whatsoever. I also get no module information. About the python settings I was wondering whether this was deprecated somehow since it seems the extension doesn't support this (not listed). Commented Dec 21, 2020 at 12:40

2 Answers 2

2

Since Nov 2020 the Jupyter extension is seperated from Python extension for VS Code. The setting key has been renamed from python.dataScience to jupyter^update

So in your case please rename python.dataScience.runStartupCommands to jupyter.runStartupCommands

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! Now the setting is finally recognized...still, the Jupyter doesn't work well with Intellisense, but this seems a different issue altogether.
1

According to your description, you could refer to the following:

  1. Whether in the ".py" file or the ".ipynb" file, we can use the shortcut key "Ctrl+space" to open the code suggested options:

    enter image description here

  2. It is recommended that you use the extension "Pylance", which provides outstanding language services for Python in VSCode, and related content will also be displayed in the Jupyter file:

    enter image description here

Combine these two methods:

enter image description here

For setting "python.dataScience.runStartupCommands", as it shows "Unknown Configuration Setting", now we don't use it to set Jupyter's "Intellisense" in VSCode.

3 Comments

That's interesting. I activated Pylance and changed the Language Server to Pylance. It is working in standard .py files, also trigger suggest works, but in Jupyter Notebooks .ipnyb it just won't work: code completion yes, but no trigger suggest (not recognized as a command). Everything is working again in .py with magic commands # %%.
@user190080 -Thank you for sharing the method with us.
sure, you're welcome. Unfortunately, the magic commands approach doesn't really solve the issue - for example, in the Jupyter Notebook, executed cell's output will be displayed right under the cell, which doesn't work with the magic commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.