I am a complete newbie when it comes to emacs. I've got this problem with my 25.2.1 emacs running on Windows 10. Trying to run a python code results in the following error.

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.

This problem has been discussed at this forum before in the following link Your ‘python-shell-interpreter’ doesn’t seem to support readline

I have tried all the tricks stated in that link but have had no success

(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 "_"))))

Do you have any suggestions for me?

2 Answers 2


The links you were reading are mostly about macOS and/or Emacs 25.1 and earlier.

Unfortunately, the "native" completion won't work under Windows, as it lacks PTYs.

So you should do (setq python-shell-completion-native-disabled-interpreters '("python")) to suppress the warning, and accept the "fallback" completion method without further noise.

  • What should I do if I am using python3: I do still get an error message as follows: import codecs, os;__pyfile = codecs.open('''/var/folders/mx/m3c2fd193h169gg6nd5x3p480000gn/T/pyo08Hj3''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/mx/m3c2fd193h169gg6nd5x3p480000gn/T/pyo08Hj3''');exec(compile(__code, '''/Users/alper/code/string.py''', 'exec')); @npostavs
    – alper
    Commented Jun 21, 2020 at 18:46

Known problem and some solution might be found here



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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