question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discovery runs `conda info` command multiple times during startup when large number of conda interpreters are present

See original GitHub issue

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. Screen Shot 2021-12-16 at 11 09 31 AM

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:closed
  • Created 2 years ago
  • Comments:37 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
karrtikrcommented, Apr 13, 2022

This only fixes the issue that conda info command is only run once during startup. So discovery may still take longer and we may run interpreterInfo.py scripts but that is to be expected. Just make sure the same command isn’t run twice.

Thank you, just ran it, seemed to take about 5+ mins to load still

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.

1reaction
karrtikrcommented, Apr 13, 2022

The fix is out in the latest stable release, so simply updating to the latest version of VSCode and extension should ideally fix it.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found