You may search for settings about additional import search resolution paths:

"python.analysis.extraPaths": [
    "path1",
    "path2",
],

Please have a try.

More information view Pylance Settings and Customization.

Answer from Molly Wang-MSFT on Stack Overflow
🌐
GitHub
github.com › microsoft › pylance-release › issues › 642
Allow users to blacklist certain folders · Issue #642 · microsoft/pylance-release
November 23, 2020 - Unfortunately, pylance check that folder and I get 1000+ errors....
Author   ierezell
🌐
GitHub
github.com › microsoft › pylance-release › blob › main › docs › settings › python_analysis_exclude.md
pylance-release/docs/settings/python_analysis_exclude.md at main · microsoft/pylance-release
This configuration tells Pylance to exclude all files from analysis, effectively only analyzing files you have open in the editor. ... The pattern **/src/** does not match src/ because there is no folder preceding src.
Author   microsoft
🌐
GitHub
github.com › microsoft › pylance-release › issues › 422
Ignore flag for files and folders · Issue #422 · microsoft/pylance-release
September 25, 2020 - It's very common to have a virtualenv folder in a project directory. Python files in a virtualenv should be skipped by Pylance, either by default (.venv, site-packages, etc) or via a configurable ignore/exclude setting.
Author   pikeas
🌐
GitHub
github.com › microsoft › pylance-release › blob › main › docs › settings › python_analysis_ignore.md
pylance-release/docs/settings/python_analysis_ignore.md at main · microsoft/pylance-release
1 month ago - In large projects or specific development environments, you might encounter situations where certain files or directories generate unwanted diagnostics (errors and warnings) from Pylance. This can occur with third-party libraries, generated files, or code that intentionally deviates from standard practices. To manage this, Pylance provides the python.analysis.ignore setting, allowing you to suppress diagnostics for specified paths.
Author   microsoft
🌐
GitHub
github.com › microsoft › pylance-release › issues › 5896
Pylance still report problems in excluded or ignored directories, even in a closed file · Issue #5896 · microsoft/pylance-release
May 18, 2024 - Type: Bug Add a directory in "python.analysis.ignore" and "python.analysis.exclude" Leave a problem in the py or ipynb file in this directory Close the file Extension version: 2024.5.1 VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736...
Published   May 18, 2024
Author   Saltsmart
Find elsewhere
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Pylance Workspace Folder Scope - Visual Studio Marketplace
August 23, 2025 - Extension for Visual Studio Code - Scopes Pylance analysis to each workspace folder and auto-disables it if a folder exceeds a file-count threshold.
🌐
Readthedocs
micropython-stubs.readthedocs.io › en › main › 22_vscode.html
Configuring VSCode, Pylance or Pyright — Micropython-Stubs 1.23.0 documentation
This page will focus on configuring Pylance and Pyright to use the MicroPython stubs. Vscode has a flexible configuration system with settings that can be set at the user, workspace or folder level. The settings can be stored in a settings.json file in the .vscode folder of the workspace or ...
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Pylance - Visual Studio Marketplace
2 weeks ago - Extension for Visual Studio Code - A performant, feature-rich language server for Python in VS Code
🌐
Visual Studio Code
code.visualstudio.com › docs › python › settings-reference
Python settings reference
November 3, 2021 - The language server settings apply when python.languageServer is Pylance or Default.
🌐
Learnscript
learnscript.net › en › python › development-tools › vscode › pylance
VSCode Pylance Extension Usage and Setup Instructions - Python Tutorial | Learn
June 15, 2024 - Like most VSCode extensions, Pylance provides developers with settings that allow you to tweak and change some of the functionality implemented by the Pylance extension by editing the setting.json file in the .vscode folder of your workspace or by editing the related items in VSCode’s Settings Panel.
🌐
GitHub
github.com › microsoft › pylance-release › issues › 123
Finding references analyzes excluded files · Issue #123 · microsoft/pylance-release
July 16, 2020 - Environment data Language Server version: 2020.7.2 OS and version: Mac 10.15.5 Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3.6 Expected behaviour When Find references is triggered search is only done files whic...
Author   jahan01
🌐
GitHub
github.com › microsoft › pylance-release › issues › 3793
Cannot suppress Pylance diagnostic errors in Python library files when try to set up configuration options · Issue #3793 · microsoft/pylance-release
December 30, 2022 - Navigate to .py / .pyi file from the Python Standard Library folder (tested with typing.py) or Pylance's typeshed stubs directory (tested with builtins.pyi) Note: I've tried to add the absolute path of my Python Standard Library directory to the next settings: "python.analysis.exclude" / "python.analysis.ignore" from language server settings, "exclude" / "ignore" fields from pyright config options.
Author   ivanzemskiy