formulahendry / formulahendry/vscode-code-runner

Cannot use multiple python interpreters

Open
#320 6 comments 3 reactions 0 assignees View on GitHub
bug
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:
![vscode-python](https://user-images.githubusercontent.com/16658131/41626543-69bccc10-73d1-11e8-8140-f1e920983d1c.JPG)

Using default python in PATH variable:
![vscode-python-work](https://user-images.githubusercontent.com/16658131/41625869-3d6440d2-73cf-11e8-942e-142d01958a59.JPG)

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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.