Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode requires me to re-select my python interpreter each time it starts

[edited!] Everytime I start Microsoft Visual Code, I get the following alert:

enter image description here

This behavior started a few days ago (after a windows's update). I can select the python interpreter and after that, everything works just fine. From within vscode, I can open a terminal in my virtual environment and I can launch the debugger for django.

enter image description here

The problem is that once I quit vscode, it forgets. Next time I start it up, I have to repeat the process. I have to do it every time.

My environment is:

Windows 11 wsl2 Ubuntu 22.04 pyenv (python 3.9.15 selected) poetry

I've tried the following:

  1. Researched issue.
  2. Tried Python: Clear Cache
  3. Rollback of Python extension to version 2021-02. Restored to latest.

I'm out of ideas at this point. Is this a configuration issue? Any other ideas on how I can resolve this? This may be an extension issue, but I want to make sure I'm not doing something incorrect with visual code.

like image 620
Mark Ryan Avatar asked Oct 16 '25 14:10

Mark Ryan


1 Answers

Apparently, this was an extension issue. I followed the github link to the python extension project and found a recently closed bug that looked similar. One of the comments suggested I try the pre-release version and my issue is no longer reproducible. Thanks everyone for the help.

https://github.com/microsoft/vscode-python/issues/20644

like image 120
Mark Ryan Avatar answered Oct 19 '25 04:10

Mark Ryan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!