VSCode Python Module Could Not Be Resolved
2022-11-23
說明使用 Visual Studio Code 引用 Python Module 發生無法 Resolved 的處理方式。

說明
首先使用 pip show
確認 modules 的檔案位置
pip show flask
從 Location 確認 modules 的檔案位置後,在 VSCode 使用 Ctrl + Shift + P 並輸入 Open User Settings(JSON) 進行設定:
"python.analysis.extraPaths": [
"c:/users/webber/appdata/local/programs/python/python310/lib/site-packages"
]
完成後重新啟動 VSCode,就可以發現 Module 被正確解讀,該有的 Intellisense 都出現囉 😃