You’ve just scaffolded a pristine new project. You ran poetry add fastapi (or pandas, or numpy), the install finished without a hitch, and your pyproject.toml looks beautiful. You open VS Code, type import fastapi, and then you see it.
Practical Fixes
poetry env info --path → select ./.venv/bin/python.vscode/settings.json:
"python.analysis.extraPaths": ["$workspaceFolder/.venv/lib/python3.x/site-packages"]
poetry shell before launching VS Code. "python.analysis.extraPaths": ["./path/to/your/site-packages"] Use code with caution. Copied to clipboard Visual Studio Code Pylance (report Missing Imports ) pylance missing imports poetry hot