相对路径
相对路径有问题,可能是安装了code-runner
解决办法
打开设置,搜索
Code-runner
fileDirectoryAsCwd
"code-runner.executorMap": {
"python": "/home/solejay/anaconda3/envs/ml/bin/python",
},
"code-runner.runInTerminal": true,
"code-runner.fileDirectoryAsCwd": true
最重要是最下面一条,改成 true。