Vscode中code runner提示:No such file or directory ,但是在终端terminal中运行正常
Here's the solution:
- If you're not using Code Runner: you need to go to settings (press Ctrl+, to do so) and type "Python Terminal Execute in File Dir". Then tick the first checkbox that shows up and you're done.
- If you are using Code Runner: Go to settings and type "Code-runner: File Directory as Cwd" into the search bar. Then tick the first checkbox that shows up and you're done. You don't need to do step one of my answer, but you can if you want to.
浙公网安备 33010602011771号