(Emacs version 26.1, Org version 9.1.9)
I have tried numerous solutions to get working in org-mode
source blocks. This solution works to change python-mode
to utilize the Python3 interpreter, which I have installed in the local directory. I believe the only relevant part of my config.org
file is as follows:
(setq exec-path (append exec-path '("c:/users/chenry/appdata/local/continuum/anaconda3")))
(setq python-shell-interpreter "c:/users/chenry/appdata/local/continuum/anaconda3/python.exe")
; more settings...
(with-eval-after-load 'org
(org-babel-do-load-languages
'org-babel-load-languages
'(; other babel languages
(emacs-lisp . t)
(org . t)
(shell . t)
(sql . t)
(C . t)
(plantuml . t)
(R . t)
(python . t))))
This works in python-mode
, but not in org-mode
python source blocks. I've also tried this solution, but I receive the Org-Babel Error Output:
'python3' is not recognized as an internal or external command, operable program or batch file.
For example:
Any advice for how I can make python-mode
and org-mode
Python interpreters consistent? Thanks!
(setq org-babel-python-command "c:/users/chenry/appdata/local/continuum/anaconda3/python.exe")
If you move this to an answer, I'm happy to accept.