2

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)
          (python-shell-completion-native-output-timeout
           python-shell-completion-native-try-output-timeout))
      (python-shell-completion-native-get-completions
       (get-buffer-process (current-buffer))
       nil "_"))))

Do you have any suggestions for me?

1

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.

0

Known problem and some solution might be found here

https://github.com/jorgenschaefer/elpy/issues/887

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.