Search code examples
visual-studio-codepylance

How do I activate Pylance in VS Code?


I've been using the default VS Code extension for Python (Pylance) for quite some time, but one day I noticed that I wasn't getting the usual Intellisense. I tried changing to Jedi and it worked fine. However, I now want to switch back to Pylance because that's the one that most sites have information on when it comes to type hints.

I tried switching with this line:

"python.languageServer": "Pylance",

And got this error message:

Error Message

However, when I click on "Install Pylance", I get no message about any install and the issue is still present. I haven't disabled the Python extension at any point in this process, so I'm not sure why it says Pylance is not installed.

So how do I enable Pylance again?


Solution

  • Search for Pylance in the extension panel and click Install

    enter image description here

    This extension is included in the Python extension, you can also uninstall Python and reinstall it.