vscode-code-runner
vscode-code-runner copied to clipboard
[Bug] Python code using bad interpreter path on Windows (`/usr/bin/python3`)
- VS Code Version: 1.83.1
- OS Version: Windows 10
- Code Runner Version: 0.12.1
Describe the bug
Run code with a Python file open attempts to run /usr/bin/python3
which does not exist.
User settings include the following, but are not being used:
"python.defaultInterpreterPath": "C:\\Users\\gkistner\\AppData\\Local\\Programs\\Python\\Python312\\python.EXE"
"code-runner.executorMap": {
"python": "python -u",
"python3": "python -u",
}
Environment PATH
variable includes the path to the executable (both user and system environment variables).
To Reproduce Steps to reproduce the behavior:
- Open file with
.py
extension - Issue
Run Code
command
Actual behavior
[Running] /usr/bin/python3 "c:\Users\gkistner\Downloads\google-python-exercises\hello.py"
The system cannot find the path specified.
[Done] exited with code=1 in 0.095 seconds
Expected behavior Correct or configured file path is used.
在 setting.json 增加以下配置:
"code-runner.respectShebang": false