The button opens a terminal panel in which your Python interpreter is automatically activated, then runs python3 hello.py (macOS/Linux) or python hello.py (Windows)
The options on Mac are slightly different, but according to the website VS Code should be issuing the file with python3 on Mac, but in fact it is calling python which should only be called on Windows.
EDIT:
I have adjusted "code-runner.executorMap.python" to "python3 -u" in settings.json.
VS Code version: Code 1.73.0 (8fa188b2b301d36553cbc9ce1b0a146ccb93351f, 2022-11-01T15:38:50.881Z)
OS version: Darwin x64 22.2.0
Modes:
Sandboxed: No
Type: Bug
I'm following the Python Tutorial steps on the official website: https://code.visualstudio.com/docs/python/python-tutorial#_run-hello-world
ie.
The options on Mac are slightly different, but according to the website VS Code should be issuing the file with
python3
on Mac, but in fact it is callingpython
which should only be called on Windows.EDIT: I have adjusted
"code-runner.executorMap.python" to "python3 -u"
insettings.json
.VS Code version: Code 1.73.0 (8fa188b2b301d36553cbc9ce1b0a146ccb93351f, 2022-11-01T15:38:50.881Z) OS version: Darwin x64 22.2.0 Modes: Sandboxed: No
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz (8 x 2900)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|11, 6, 6| |Memory (System)|16.00GB (0.09GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions (44)
Extension|Author (truncated)|Version ---|---|--- toml|be5|0.6.0 vscode-intelephense-client|bme|1.8.2 vscode-devtools-for-chrome|cod|0.0.7 dart-code|Dar|3.52.1 es7-react-js-snippets|dsz|4.4.3 vscode-html-css|ecm|1.13.1 go|gol|0.36.0 vs-code-runner|Har|2.0.1 haskell|has|2.2.1 latex-workshop|Jam|9.0.1 language-haskell|jus|3.6.0 markdown-math|koe|0.1.0 vscode-docker|ms-|1.22.2 csharp|ms-|1.25.0 vscode-edge-devtools|ms-|2.1.1 remote-containers|ms-|0.262.3 cmake-tools|ms-|1.12.27 cpptools|ms-|1.12.4 cpptools-extension-pack|ms-|1.3.0 powershell|ms-|2022.10.0 phoityne-vscode|pho|0.0.28 ruby|reb|0.28.1 java|red|1.12.0 LiveServer|rit|5.7.9 synthwave-vscode|Rob|0.1.14 rust-analyzer|rus|0.3.1277 scala|sca|0.5.6 sonarlint-vscode|Son|3.11.0 latex-utilities|tec|0.4.8 math-snippets|tho|0.1.1 latex-support|tor|3.10.0 cmake|twx|0.0.17 intellicode-api-usage-examples|Vis|0.2.6 vscodeintellicode|Vis|1.2.29 latex-workshop-sanity|vom|8.5.0 vscode-java-debug|vsc|0.46.0 vscode-java-dependency|vsc|0.21.1 vscode-java-pack|vsc|0.25.6 vscode-java-test|vsc|0.37.1 vscode-maven|vsc|0.39.2 vscode-icons|vsc|12.0.1 vim|vsc|1.24.3 volar|Vue|1.0.9 vscode-ruby|win|0.28.0 (13 theme extensions excluded)