-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Discovery runs conda info
command multiple times during startup when large number of conda interpreters are present
#18200
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
Comments
Is Discovery Interpreters somehow hindering this or your work? |
Was the environment previously selected for the workspace or was the terminal you launched VS Code from already activated? Or did you open a workspace with no environment selected and then you chose it (i.e. some form of discovery would have been required to find the environment regardless)? |
Yes, during this time that "Discovering Python Interpreters" message is present the indexer does not work so I can't click on variables, click to go to function definitions, etc. @brettcannon, I set the "Default Interpreter Path" through this setting: To summarize, if "Default Interpreter Path" is set, I would expect "Discovering Python Interpreters" not to have run, which would then allow features related to the indexer to work instantly |
I see, can you provide me the logs as mentioned in the issue template during the message is present? I'm interested in the commands extension runs which particularly slows things down for you. LogsOutput for
|
Thanks @karrtikr! log.txt attached, it looks like it fails to do something in the beginning and then starts stepping through every single conda environment in The
|
Same problem here :( |
@wubdub Please try the following VSIX https://github.com/microsoft/vscode-python/suites/4975845256/artifacts/145186523 and let me know if it helps: Use |
@karrtikr thanks! I get a "Failed to generate URL to download artifact" message, perhaps it has expired? |
It was a build off this PR #18309, will rebuild and post the new artifact soon. |
I'm not sure why it would take 10 mins given your log, it seems |
Also, try the following VSIX where we do not trigger discovery at all: https://github.com/microsoft/vscode-python/suites/5101652551/artifacts/152593035 |
Ping @wubdub |
Also see #18647 for the feature request you asked for. |
Thanks and here is the final VSIX I have for you: https://github.com/microsoft/vscode-python/suites/5609518918/artifacts/182361458
Looking at the logs I noticed that the language server (Pylance) responsible for providing these features was not started until discovery was finished (created #18671). So in the VSIX above I ensure Pylance is started first, and discovery is triggered afterwards. Let me know how long does it take here to unblock you for using the above features. Also please provide the logs. |
Awesome!! The Pylance features are now nearly instantly available, works great! |
Fantastic 🥳 thanks for your help. We'll fix it soon with #18671, I'll fix the bug discovered here #18200 (comment) with this issue. |
conda info
command multiple times during startup when large number of conda interpreters are present
conda info
command multiple times during startup when large number of conda interpreters are presentconda info
command multiple times during startup when large number of conda interpreters are present
Hello, |
The fix is out in the latest stable release, so simply updating to the latest version of VSCode and extension should ideally fix it. |
@karrtikr I am actually running v2022.4.1 but the "Discovering Python Interpreters" continues to spin for a long time, printing out |
This only fixes the issue that
Stable VSIX should bring you to this state you mentioned above. The fact that language server isn't started will be fixed by #18671. |
VS Code version
1.63.0
Extension version
v2021.12.1559732655
OS type
macOS
OS version
11.4
Python distribution
Anaconda
Python version
3.8.5
Language server
Default
Expected behaviour
I would expect the extension to just use the already selected Python interpreter on the left and provide indexer features (like the ability to click through functions) on startup.

Actual behaviour
The "Discovering Python Interpreters" dialog spins forever. If I go to "Output" and then select "Python" on the right drop down, the issue is the extension is looping through hundreds of python versions available on the cluster I am ssh'ing into.
For example, I see a constant output of the format, for everyone of hundreds of conda envs. I would just like to skip this discovering step and use the one I already selected.
Steps to reproduce
Have many python versions available in your conda env.
Logs
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: