Description
I'm using Windows 11 latest update, Vscode latest version, Python version 3.13.3, I'm using pip and vrtualenv, not uv. I don't use uv. I have ruff extension and pylance extensions for Python installed.
To reproduce this bug
-
Create a python project A, with virtualenv and install some dependencies, and set VScode to use the virtualenv you created by changing the Python interpreter in Vscode.
-
Create a python project B, with virtualenv and install some different dependencies, and set VScode to use the virtualenv you created by changing the Python interpreter in Vscode.
-
close all Vscode instances
-
Open now project A in VSCode, everything works fine
-
Keep project A open, create a new vsode window, ctrl + shift + n then open project B
Now you'll notice Vscode complaining about some pip dependencies missing from project B, that's simply because vscode is still connected to project A virtualenv, you'll have to switch the interpreter for project B manually by selecting the correct virtualenv.