"terminal.integrated.env.osx": {
"PYTHONPATH": "${workspaceFolder}/",
},
"terminal.integrated.env.linux": {
"PYTHONPATH": "${workspaceFolder}/",
},
"terminal.integrated.env.windows": {
"PYTHONPATH": "${workspaceFolder}/",
},
文件结构
lib1/train.py
lib2/test.py
lib2/init.py
由train.py调用lib2中的test.py中的类或函数时vscode需要配置settings.json文件,才能实现import导入无问题