Open leij0318 opened 11 months ago
Can anyone tell me how to modify or cancel the python global interpreter?
Try putting the path to your Python executable in settings.json:
"code-runner.executorMap": {
"python": "path-to-your-env-python-executable-here"
}
For example, mine would be:
"code-runner.executorMap": {
"python": "/home/user/anaconda3/envs/vsc/bin/python"
}
try this setting
"code-runner.executorMap": { "python": "$pythonPath $fullFileName" },
"code-runner.respectShebang": false
I don't know why the Python interpreter that CodeRunner takes effect is always the global interpreter, not the default python interpreter set. The global interpreter I am talking about is the python interpreter with the word global at the end after opening the command panel in VScode and entering python. Now you can only specify the python interpreter path in "code-runner.executorMap" in setting.json.
The above situation I mentioned is that CodeRunner does not execute in the terminal by default. Of course, it will not be wrong if it is executed in the terminal, but my default terminal powershell is integrated in the windows terminal. When executing, I must first activate the current environment. Dislike the slow startup speed.