Pylance restarts. Within 10 seconds, red squiggles should vanish.
Add this configuration to let Poetry tell VS Code where the env is: pylance missing imports poetry link
Pylance, however, looks for a Python interpreter (and its associated site-packages directory) in one of three places: Pylance restarts
The most common reason for this error is that VS Code is pointing to a global Python interpreter (like your system Python) rather than the virtual environment Poetry created for your specific project. Pylance restarts. Within 10 seconds