-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always require restart when installing new package and cannot find python interpreter... further update#2501 #2505
Comments
Would you please add the information in the report as described in the troubleshooting guide? |
meanwhile, you can use "Python: Restart Language Server" command to manually ask server to scan packages. it is the same command we internally call when we discover library changes by file watcher. so, there should be no difference on perf except you are doing it explicitly (instead of us doing it automatically) |
how do i do that @heejaechang |
means without doing it manually how do i automate this |
@Zaeem20 we only support auto restart when packages are installed under project root. we don't support packages installed outside of project root for auto refresh for now. but that being said, even for the supported case, our restart timeout is 10 mins. which means you won't see the changes for at least 10 mins since the last library changes (such as installing new package) if 10 mins are too long, only option you have is forcing update using the command ("Python: Restart Language Server" ) above. you can find the command from the command palette (https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) |
means i have to wait 10 mins |
Seems like this is related to #2473. Adding an option to either reduce or turn off this delay would be a great solution for me. |
@RobertCraigie we could consider changing static 10 min to something like exponential back off time (10 seconds -> 20 seconds -> 40 seconds -> 10 mins) but until we can come up with better way to handle multi workspaces or some tools that keep writing and deleting temp file in lib path, we probably will leave it to 10 min and ask to use restart command as workaround for now. |
in next release, we will support detecting outside of workspace root site-package (python search path) changes. but delay will be still 10 mins. |
ok thanks for your co-operation @heejaechang |
unfortunately, I found issue on the fix. we need to move to newer version of LSP for the fix to work. re-activated the issue and I will hold onto it until we move to newer version of LSP. |
@heejaechang still doing same thing sir |
@heejaechang i am still getting error of no python interpreter is selected, it is not fixed yet |
try to manually select it. https://code.visualstudio.com/docs/python/environments#_select-and-activate-an-environment |
outside workspace fix is now in prerelease build. |
outside workspace fix should be fixed in next release. |
@Zaeem20, the fix is available in the latest Pylance insiders build (2022.5.0-pre.1). We're not shipping a stable build this week. If you're not using Pylance insiders, you'll see the fix in next week's stable build. |
@debonte its won't fixed yet it showing me reportMissingImports while installing new library from pip |
@Zaeem20 only detection is fixed, the 10 min delay is same as before (#2505 (comment)) we will take a look at 10 min delay once we address issues on multi workspace support. |
ok i understand, but it was instantly detecting all packages in virtualenv |
@Zaeem20 if there is an issue you want us to take a look? can you open a new issue? using 1 issue for everything make it really hard to track progress. and when you open an issue, please put logs as described in the troubleshooting guide? also, providing some repro steps will make it easier for us to track down the issue. |
This issue has been fixed in version 2022.5.1, which we've just released. You can find the changelog here: CHANGELOG.md |
I am reopening issue #2501
• i am not using conda & virtual env
• i am at root folder which is D:\MyFolder
Below are the issues require restart to be fixed...
• it occurs when i open vscode first
• give me warning whenever i install new pkg through integrated ps, but it work fine when i run it
The text was updated successfully, but these errors were encountered: