-
Notifications
You must be signed in to change notification settings - Fork 133
IntelliSense/completions not updating after installing package into current virtual environment #562
Comments
Oh, I thought it never did work, as I've been reloading VSC. |
See also microsoft/PTVS#5026. I think this is a consequence of the module resolution stuff where we don't re-analyze if the packages change. |
With #611 |
This doesn't appear to be working, same repro, the squiggle goes away after reloading |
This is an extreme hassle. There's no way to reload the language server without reloading the entire window, which terminates all processes running in the terminal windows. |
I'm currently working on fixing the file watcher to detect package installs (see those linked issues above), but as a workaround you can also kill the language server process directly. That's obviously not perfect (and after the 5th restart, the VS Code language server client will stop restarting things), but would allow you to not kill your terminal windows. |
We've made this opt-in, as it was causing more issues than it was solving (#1841). If you'd like to restore this, you can 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 |
Well it wouldn't be a big deal if I didn't have to reload the entire window. Why isn't there a command to rescan libraries? Or a command to restart the language server? |
A command to restart the LS without a reload would be microsoft/vscode-python#3073. Feasibly without this directly supported, you can kill the LS process itself and it will be restarted up to 5 times, or you can select a different interpreter and switch back, but these are workarounds. Again, you can re-enable that option and see if it's stable for you. |
Using Microsoft Python Language Server version 0.1.78.0 with 2019.1.0 of the extension, on Windows 10.
Actual:
import requests
, see warning that module is not found (correct)pip install requests
into virtual environmentExpected: after installing requests, the language server picks up completions for newly installed packages without having to restart VS Code.
I believe this is a regression, as this used to work.
The text was updated successfully, but these errors were encountered: