VS Code says a Python package is missing — but you already installed it?
This usually means VS Code and pip are looking at different Python environments. We will prove which interpreter is active before reinstalling anything.
First, prove which Python VS Code is actually using.
Run this in a fresh VS Code terminal. Then use Command Palette → Python: Select Interpreter and compare the selected interpreter with the path printed here.
python -c "import sys; print(sys.executable)"Check the package from the same interpreter — not from a random pip command.
Replace PACKAGE_NAME with the real package. If it is missing here, install it with the same interpreter: python -m pip install PACKAGE_NAME. This avoids the common “pip installed it somewhere else” problem.
python -m pip show PACKAGE_NAMERetest the exact problem — do not assume it is fixed.
If the import succeeds and prints a path inside the intended environment, the package is available to that Python. If the editor still shows a warning, reload the VS Code window after confirming the correct interpreter.
python -c "import PACKAGE_NAME; print(PACKAGE_NAME.__file__)"Fix complete. 😎
You verified the result instead of stopping after a hopeful change. Save the working interpreter/version/environment details with the project so you can reproduce them later.
Back to Fixes →This guided fix follows current official documentation. ITFixLab does not execute commands for you; you stay in control of your machine.
VS Code Python environments ↗VS Code Python editing / import troubleshooting ↗