VScode: How to Solve Pylance Error (pip Library Files Installed)

View Python installation location

Enter in Terminal

where python

View PIP installation library file location

pip show <packagename>

Open vscode and set the library path

Ctrl+shift+p Open ` preference; Open Settings(JSON)

Add path

"python.analysis.extraPaths":[
	    "/root/miniconda3/lib/python3.9/site-packages",
        "/root/.local/lib/python3.9/site-packages",
        "...."
        ]

Read More: