I've recently moved to a new computer and cannot get org babel to work with Python (it worked fine on my old machine). I'm using OS X 10.12.6 with Emacs for Mac OS X based on Emacs 25.3 with org-mode-9.1.12 and Anaconda3 as my Python distribution.
The problem is that whenever I try and evaluate a code block I get the message
Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native-enable’ was t and "python" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list. Native completions have been disabled locally."
In my init.el file I load exec-path-from-shell (because I'm using a Mac and not calling Emacs from the command line). My shell (bash) has the path to my Python distribution, anaconda3, which is in my home directory (because of new computer security rules at my place of work prevents a system wide installation). Python works fine from the command line (the commands python and python3 are symbolic links to the python executable) and from Jupyter notebooks, but not from within an emacs org file. My Python distribution has the readline module and it loads fine from the terminal.
I set up org-babel using
(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)
(matlab . t)))
This used to all work on my older system (before the new security rules, which might be a red-herring). My guess is that somehow org is picking up the wrong python but I can't figure out how or why.
Any thoughts on this would be greatly appreciated.