Search code examples
pythonvisual-studio-codejupyter-notebookpylance

How can I get Pylance auto-imports on Jupyter Notebook VSCode?


Is there any way I can have the Pylance auto-import function on Jupyter Notebooks?

Right now Pylance acts like he doesn't know the package each time I write a function when on a notebook, if I switch to a .py file it works perfectly.

"train_test_split" is not defined Pylance(reportUndefinedVariable)

Image of that ^

It's such an annoyance having to import manually each time when working on notebooks.


Solution

  • My question has been answered by the Py-Lance team here.

    The feature wasn't implemented yet but is right now available in the insider VS Code version as of now.