错误原因:shell 打开失败,导致 conda activate 失败,没有环境,自然没有 numpy
解决:
在 settings.json 中加入:
"terminal.integrated.profiles.windows":{
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}
},
"terminal.integrated.defaultProfile.windows":"Command Prompt"