Save the file. Pylance respects this configuration.
If you don't see your Poetry environment listed, click Enter interpreter path... -> Find... and navigate to your project folder. If you have configured Poetry to store virtual environments inside the project (see Solution 4), look for the Scripts/python.exe (Windows) or bin/python (macOS/Linux) file inside the .venv folder.
You get the venv name by running poetry env list .
Find your Poetry venv path:
Sometimes, the imports work when you run the code but fail in the editor. This is often due to how Pylance analyzes the code.
Ready to get started?
Join developers who use Uploadcare to build file handling quickly and reliably.
Sign up for free
Written by Trust Jamin Okpukoro
Trust Jamin Okpukoro is a Developer Advocate and Senior Technical Writer with a strong background in software engineering, community building, video creation, and public speaking. Over the past few years, he has consistently enhanced developer experiences across various tech products by creating impactful technical content and leading strategic initiatives. His work has helped increase product awareness, drive user engagement, boost sales, and position companies as thought leaders within their industries.
Pylance Missing Imports Poetry Exclusive Page
Save the file. Pylance respects this configuration.
If you don't see your Poetry environment listed, click Enter interpreter path... -> Find... and navigate to your project folder. If you have configured Poetry to store virtual environments inside the project (see Solution 4), look for the Scripts/python.exe (Windows) or bin/python (macOS/Linux) file inside the .venv folder. pylance missing imports poetry
You get the venv name by running poetry env list . Save the file
Find your Poetry venv path:
Sometimes, the imports work when you run the code but fail in the editor. This is often due to how Pylance analyzes the code. click Enter interpreter path... ->