VS code是一个轻量级的IDE,非常方便。今天调试Python代码时,报错[Errno 2] No such file or directory(见下图)。其实这个文件就在主程序的同一个文件夹里。
解决办法(见下图):1、打开设置;2、搜索“python.terminal.executeInFileDir”;3、勾选“When executing a file in 。。。。”
VS code是一个轻量级的IDE,非常方便。今天调试Python代码时,报错[Errno 2] No such file or directory(见下图)。其实这个文件就在主程序的同一个文件夹里。
解决办法(见下图):1、打开设置;2、搜索“python.terminal.executeInFileDir”;3、勾选“When executing a file in 。。。。”