formulahendry / formulahendry/vscode-code-runner
[Bug] Python code using bad interpreter path on Windows (`/usr/bin/python3`)
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
- 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:
```json
"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:
1. Open file with `.py` extension
2. 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.