I've got this problem with my 25.1 and Python 3.5 on Ubuntu 16.10, but I don't see it being solved anywhere. Wondering what the latest status was. Reproducing:

> emacs -Q --eval '(setq python-shell-interpreter "python3")'


M-x run-python gives

Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native’ was t and "python3" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list.  Native completions have been disabled locally.

I saw one idea where an M-x find-function python-shell-completion-native-try would pull up the function from deep (/usr/local/share/emacs/25.1/lisp/progmodes/python.el.gz and the very last line was supposed to be nil "_"))) and not nil ""))). Another conversation here talks about changing inputrc

I switched to another user and I was able to use `run-python' without any warnings. Turns out it was my readline settings. Bash 4.3 added a new readline feature: "set colored-stats on" which I had in .inputrc Removing that line fixed my issue, I think this should be reproducible for all.

Anybody know what the latest is on this? BTW, running Python2 ((setq org-babel-python-command "python2")) doesn't have this problem.

  • The Emacs bug you linked to is marked as solved for 25.2 (not released yet), so you should expect it to still be present in 25.1. You can try the pretest version (25.1.9x). – npostavs Jan 18 '17 at 18:36
  • Know when 25.2 is out? – 147pm Jan 18 '17 at 18:53
  • Maybe a month or so? You can try the pretest (25.1.91) now alpha.gnu.org/gnu/emacs/pretest – npostavs Jan 18 '17 at 19:20
  • I’ve got the same symptoms ("Your ‘python-shell-interpreter’ doesn’t seem to support readline") running Python 3.6.0 and GNU Emacs 25.2 RC1 on Windows 10, so either the problem isn’t solved yet, or maybe it is a different problem? – Martin Feb 21 '17 at 19:31

If you don't want to get a 25.2 rc, you can apply the bug fix by adding this to your init.el file:

(with-eval-after-load 'python
  (defun python-shell-completion-native-try ()
    "Return non-nil if can trigger native completion."
    (let ((python-shell-completion-native-enable t)
       (get-buffer-process (current-buffer))
       nil "_"))))


| improve this answer | |
  • Works like a charm. Thanks for sharing. – dangom Feb 23 '17 at 11:30
  • 2
    For some reason adding this (setq python-shell-completion-native-enable nil) to my init.el file worked, without requiring the code above. – Guilherme Salomé Jan 19 '18 at 21:58
  • @GuilhermeSalomé that suppresses the warning, but you don't get native completion. If you're on Windows, that's the right thing to do. – npostavs Jan 20 '18 at 4:45
  • 5
    Even on Emacs 26.1 I still get this issue. – Guilherme Salomé Aug 21 '18 at 12:26
  • 1
    Also on Emacs 26.2 , and this answer still works. – Zoe Rowa Apr 19 '19 at 8:33

I had this disturbing warning in Emacs 25.1 too.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24401 has proper solution to enable colored-stats only for Bash:

$ cat ~/.inputrc
$if Bash
set colored-stats on
| improve this answer | |

A pip install readline did the job for me. Completion within python code blocks is pretty neat to have...

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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