Wrong version of Python in org code blocks

*
planted: 29/02/2024last tended: 29/02/2024

I was trying to use the statistics module.

But it was telling me it wasn't found.

It's a new thing in Python3.

I thought I had told org to use Python3 with python-shell-interpreter. But no.

I checked with

import platform
return platform.python_version()

and it was still version 2.

Turns out you also need: org-babel-python-command set to Python3 too.

See: python - org-mode: how can i point to python3.5 in my org-mode doc? - Emacs S…

1. Elsewhere

1.1. In my garden

Notes that link to this note (AKA backlinks).

1.3. Mentions

Recent changes. Source. Peer Production License.