microsoft/python-language-server

Installing packages requires restart in order for autocomplete and no errors

johntmyers opened this issue · 2 comments

Issue Type: Bug

When installing packages, VSCode has to be restarted in order for the import errors to go away and to get autocompletion to work.

Simple example:

pip install requests

image

Instant import errors:

Extension version: 2020.7.94776
VS Code version: Code 1.47.2 (17299e413d5590b14ab0340ea477cdd86ff13daf, 2020-07-15T18:18:50.054Z)
OS version: Darwin x64 19.5.0

Thanks for your feedback! We have recently released a new and more performant language server called Pylance which likely solves these issues you are reporting.  You can download Pylance from the marketplace and install it alongside the core Python extension. Because our team's development efforts have shifted to support the new language server, we'd encourage you to try it out.

In the meantime, I'll transfer this issue over to the Microsoft Python Language Server repo for tracking. If you try out Pylance and this issue persists, you can open an issue on the pylance-release repo.

This is intended behavior, see https://github.com/microsoft/python-language-server/blob/master/TROUBLESHOOTING.md#completions-do-not-update-andor-import-is-still-being-reported-as-unresolved-after-pip-install.

But I would try Pylance, which does not have the underlying issues which prevent this feature from being enabled by default.