简体   繁体   中英

How to change the executer of python in vscode?

I was trying to change the executer of python in vscode . I have installed python3 in my system.However default executer of python in vscode is python.So i am getting error as 'python not found' whenever i try to run code. So how could i change the executer to python3 in line no 4066? 在此处输入图像描述

I tried to change from user settings. I could change the interpreter there. However i didnt find any way to change the executer. 在此处输入图像描述

That's default command Code Runner provides for Python Language.

As long as the execution scripts in terminal when you run python file instead of run code is python3.8, run code should also use python3.8.

OR you can change the command directly:

"code-runner.executorMap": {
    "python": "path/to/python3.8/python.exe -u",
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM