Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Discovering Python Interpreters" taking Infinite time in VS Code

I am new to Ubuntu, as well as to python.
( This problem has started just recently until now everything was fine.)
Whenever I am trying to start my VS Code to learn Django, the VS Code is showing the following issue for an infinite time

enter image description here

i.e., it is not discovering Python interpreters. The problem seems to be in the Python Extension which I am using. I tried to Uninstall it and then reinstall it. But it turned out to be of no use.
I even tried to uninstall and reinstall vscode from my ubuntu (20.04) system itself. But vs code started from exactly where I left, with no change.
I even tried to change the python interpreter path from the command palate, but it also didn't work. enter image description here

I could find something relatable here, but I couldn't understand/follow them.
Help from someone's side would be appreciated.

like image 420
granthium Avatar asked Sep 10 '25 19:09

granthium


1 Answers

I had the same problem - vscode stuck discovering python interpreters. I tried reboting, disabling and renabling extensions - no joy.

When i looked at the list of python interpreters it had 'discovered' the first one of these was very old and in a redundant virtualenv. I quit VSCode and deleted the virtualenv as a piece of housekeeping.

I then restarted VSCode and the problem had gone away. Joy ! Hope this might be of help to someone.

like image 88
Bruce D Avatar answered Sep 12 '25 10:09

Bruce D