unresolved import 'matplotlib' code example

Example 1: vscode not recognizing python import

# In .vscode/settings.json
"python.autoComplete.extraPaths": ["./path-to-your-code"],

Example 2: python unresolved import vscode

# I use pylance now. I added this. Problem solved.
"python.analysis.extraPaths": ["./path-to-code/"],
# I tried this before, but not working. 
"python.autoComplete.extraPaths": ["./path-to-your-code"],

Example 3: unresolved import requests python

cd "C:\Program Files (x86)\Python36_64\Scripts\"
"pip install lxml" 
"pip install requests"