2

I am using the Python mode with Emacs 25.1.1 to send parts of my python scripts to an ipython console. I have the problem that both the input and the output is not shown in the python window. Whenever I use C-c C-c the line is sent to the console and is executed but in the window only an additional line number shows up. Neither the input nor the output is visible.

When I use C-c C-p to start the python console I get the error message

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

You can try to set ipython as a python shell interpreter using the following line:

(setq python-shell-interpreter "ipython" python-shell-interpreter-args "--simple-prompt --pprint")

I use elpy and it works on my settings, just ignore the warnings and go to the Python buffer. Just for information, you need to add --simple-prompt because IPython 5 doesn't support Emacs inferior shell anymore as stated in the IPython doc:

The new interface is not compatible with Emacs ‘inferior-shell’ feature. To continue using this, add the --simple-prompt flag to the command Emacs runs. This flag disables most IPython features, relying on Emacs to provide things like tab completion. current doc, you have the following line

More info on the documentation page here.

I should also add that beside the issue with IPython, there is a related known bug between Emacs 25 (and >25) and Python 3.5, it warns about no readline support (bug report).

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.