(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
     '(; 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:

enter image description here

Any advice for how I can make python-mode and org-mode Python interpreters consistent? Thanks!

  • @manandearth Works! Thank you! Added this to my init: (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. – Clark Henry Jul 12 '18 at 19:35

Try the full path to python3 inside the double quotes "foo/bar/baz/python3"

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.