Liu Hui <liuhui1...@gmail.com> writes:

> But it is indeed possible that two sessions are inconsistent, if users
> intend to have different org-babel-python-command and
> python-shell-interpreter, which are used by
> `org-babel-python-initiate-session' and `run-python', respectively.

I have just proposed this patch, which will reduce this discrepancy by
having ob-python sessions use the same interpreter as `run-python' by
default:

https://list.orgmode.org/87edf41yeb....@gmail.com/T/#u

Additionally, we could set `python-shell-interpreter(-args)' in
`org-babel-edit-prep:python' to make `run-python' in Org Src buffer use
the same interpreter as :python header or customized
`org-babel-python-command'. See the changes to
`org-babel-python-initiate-session-by-key' in the linked patch for an
example -- specifically the part using `split-string-and-unquote' to get
the 2 parts for `python-shell-interpreter' and
`python-shell-interpreter-args', respectively.

Reply via email to