Discovery runs `conda info` command multiple times during startup when large number of conda interpreters are present
See original GitHub issueVS 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.
> /home/XXX/.conda/envs/1e59305f3-855/bin/python ~/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
> conda info --json
Steps to reproduce
Have many python versions available in your conda env.
Logs
No response
Code of Conduct
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Comments:37 (2 by maintainers)
Top Results From Across the Web
Conda environment not showing up in VS Code - Stack Overflow
in vscode press ctrl+shift+p and type python:Select Interpreter you should see all the environment there. If it does not appear create a .py ......
Read more >PyCharm - Configure a conda virtual environment - JetBrains
Select Add Local Interpreter. In the left-hand pane of the Add Python Interpreter dialog, select Conda Environment. New Conda environment.
Read more >Settings Reference for Python - Visual Studio Code
Python settings reference. The Python Extension for Visual Studio Code is highly configurable. This page describes the key settings you can work with....
Read more >Advanced Visual Studio Code for Python Developers
In this tutorial, you'll learn how you can configure, extend, and optimize Visual Studio Code for a more effective and productive Python development ......
Read more >What is Anaconda for Python & Why Should You Learn it?
While the standard Python library has a lot of functionality, there are many times when we need modules and libraries that are not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This only fixes the issue that
conda info
command is only run once during startup. So discovery may still take longer and we may runinterpreterInfo.py
scripts but that is to be expected. Just make sure the same command isn’t run twice.Stable VSIX should bring you to this state you mentioned above.
The fact that language server isn’t started will be fixed by https://github.com/microsoft/vscode-python/issues/18671.
The fix is out in the latest stable release, so simply updating to the latest version of VSCode and extension should ideally fix it.