How to run python3 code in VSCode? /bin/sh: 1: python: not found How to run python3 code in VSCode? /bin/sh: 1: python: not found python-3.x python-3.x

How to run python3 code in VSCode? /bin/sh: 1: python: not found


Nearly had it. This code

..."python.pythonPath": "python3","code-runner.executorMap": {    "python3": "/usr/bin/python3"}

should be

..."python.pythonPath": "python3","code-runner.executorMap": {    "python": "/usr/bin/python3"}


In the terminal of vscode, type sudo apt install python-is-python3. After the installation is done just run the code again and enjoy.


An alternative solution

"python.pythonPath": "python3","code-runner.executorMap": {    "python": "$pythonPath -u $fullFileName"},