How to Diagnose the Problem Quickly
A common and often hidden cause is Pylance's auto-exclusion rule. Recent versions auto-exclude any folder starting with a period ( . ), which includes Poetry's .venv directory. This causes Pylance to completely ignore the virtual environment and its installed packages. pylance missing imports poetry hot