[英]Matplotlib will not import even though it is installed. Using visual studio code
[英]Visual Studio Code - Intellisense not working on SSH server even though it's installed
因此,出於某種原因,我的智能感知無法正常工作。
我嘗試了此處建議的解決方案Visual Studio Code: Intellisense not working 。
似乎對大多數人有幫助的解決方案是添加"python.autoComplete.extraPaths": [ "${workspaceFolder}/customModule" ]
,但沒有用。 VS Code 還說當我添加它時它無法識別python.pythonPath
。
自動完成不起作用,屏幕截圖沒有捕捉到我的 cursor,但它就在argparse.
,它應該提供自動完成列表的選項,其中包括: ArgumentParser
:
Settings.json這是遠程服務器上的settings.json
{
"remote.autoForwardPortsSource": "output",
"python.languageServer": "None",
"python.analysis.completeFunctionParens": true,
"python.analysis.diagnosticMode": "workspace",
}
設置:
注意:還有其他問題是我的“查找 function 或類的聲明”也不起作用。
第一個解決方案有點明顯,但無論如何我都會添加它們,
settings.json
,在"python.languageServer"
中設置一個語言服務器。 Language Server 包括: Jedi
(內置 Python 擴展名)、 Microsoft
和Pylance
,既然您已經安裝了Pylance
,那么讓我們從那個開始吧(如果不起作用,請嘗試其他)。python.pythonPath
設置為在您的終端中返回的路徑, which python3
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.