formulahendry / formulahendry/vscode-code-runner
Cannot use multiple python interpreters
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
Selecting and running a non-default python interpreter produces this error:
Using python in venv folder:

Using default python in PATH variable:

Steps to reproduce:
1. Create folder that contains a simple init.py file and a python virtual environment
2. Open this single folder using vs code
3. Select the virtual environment interpreter
4. Go to init.py file and run code runner
I had no problems running the files with vanilla visual studio code via launch.json
In my user settings, I have this configuation:
`"code-runner.executorMap": {
"python":"$pythonPath $fullFileName"
},`
pythonPath is automatically configured when selecting the interpreter.
When choosing default python interpreter:
`"settings": {
"python.pythonPath": "C:\\Users\\Nate\\AppData\\Local\\Programs\\Python\\Python36\\python.exe"
}`
When choosing venv python interpreter:
` "settings": {
"python.pythonPath": "${workspaceFolder}\\venv\\Scripts\\python.exe"
}`
Using
Code Runner 0.9.3,
Visual Studio Code 1.24.1
Python 3.6.4
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.