Shows the Python environment VS Code intends to use for the workspace.
Does VS Code appear to be using a different Python than your project expects?
VS Code's Python extension has its own selected environment. The terminal command that works outside VS Code does not automatically prove the editor, debugger, or a newly created integrated terminal is using the same interpreter.
Use Python: Select Interpreter or the interpreter shown in the VS Code Status Bar.
VS Code documents the selected environment as the interpreter used for Python language features, running code, and by default debugging. Workspace-local environments such as .venv are often detected automatically, but you still need to choose the environment your project actually intends to use.
Do not verify the change in a terminal that was already open.
VS Code activates the selected environment when it creates a new terminal. Close the old integrated terminal or create a fresh one after changing the interpreter, then ask that terminal which Python it is actually running.
python -c "import sys; print(sys.executable)"read-onlyDoes sys.executable match the interpreter/environment you selected?
Matching paths are stronger evidence than the Python version number alone. Two different environments can run the same Python version but have different packages.
Run the same code again inside VS Code.
If the original issue disappears after the interpreter and terminal agree, the problem was environment selection. If the code still fails because a package is missing, switch to the package-focused journey without changing the interpreter again.
Check whether your debug configuration explicitly points at another Python.
VS Code's current Python debugging guidance says the debugger normally uses the selected environment, but a debug configuration can specify a different interpreter. If your launch.json explicitly sets a Python path, review that project-specific configuration. I will not tell you to delete the whole file or change unrelated debugger settings.
Does the debugger now use the selected environment?

VS Code is now using the Python environment you intended. 😎
We selected the environment, created a fresh terminal, verified the actual executable path, and retested the original problem.

The selected-environment path did not explain the mismatch.
The remaining cause may involve environment discovery settings, workspace configuration, a remote/WSL context, a broken virtual environment, or an explicit debug override. Do not change global Windows PATH just because VS Code is confused.
This journey only covers interpreter/environment selection.
Extension failures, remote development, WSL, debugger installation issues, linting failures and project-specific tooling need their own focused path.
VS Code's selected interpreter is a project/tool decision; Windows PATH is a shell-discovery decision.
Those layers can interact, but they are not identical. A global terminal may resolve one Python while VS Code has another environment selected for the workspace. That is why changing PATH is a poor first response to an editor-only problem. The strongest evidence is the interpreter selected in VS Code plus the executable path printed inside a fresh integrated terminal.
Lets VS Code activate the selected environment after the choice changes.
sys.executableShows the interpreter that actually launched, so the result can be verified rather than assumed.
A correct interpreter can reveal a separate package problem.
Once VS Code is using the intended environment, a missing import is no longer evidence that the interpreter is wrong. It may simply mean the dependency is not installed in that environment. That is why this journey hands a verified interpreter into the separate ModuleNotFoundError journey instead of continuing to change interpreter settings.