Skip to main content
Share Your Experience: Take the 2024 Developer Survey
48 votes

Weird shell output when using IPython 5

IPython 5 has a new terminal interface, which is not compatible with Emacs' inferior shells. To fix it, add the --simple-prompt flag to the IPython command: (setq python-shell-interpreter "ipython" ...
Ricardo Lima's user avatar
10 votes

Spacemacs use anaconda environment

Basically, this is a duplicate of this question. Reproducing the proposed behavior with spacemacs, I changed my user-init to: (defun dotspacemacs/user-init () (setenv "WORKON_HOME" "/home/<...
Michael Gecht's user avatar
9 votes

Integrating jupyter notebook (ipython) into org-mode notebook

Nathaniel Nicandro has recently released his emacs package jupyter to further integrate org-mode with jupyter. As mentioned in the readme: emacs-jupyter extends the features of ob-ipython by ...
prash's user avatar
  • 200
8 votes

How to set up elpy to use python3?

You can solve this by modifying the python shell configuration from python to python3 in elpy-config M-x elpy-config to enter the configuration page of elpy if you scroll down you will see groups ...
oksuzgonul's user avatar
7 votes

Dedicated Python Shell?

OK, so I figured this out (thanks largely to this answer). Now, rather than simply typing C-c C-p, I use C-u C-c C-p to get the options of specifying the Python command I want, and to select a ...
farenorth's user avatar
  • 221
6 votes

Ipython completion in elpy

I don't use eply, I use emacs 25.1.1 with company-jedi with the following: (setq python-shell-interpreter "ipython3" python-shell-interpreter-args "--simple-prompt --pprint") Inside emacs *Python* ...
eflanigan00's user avatar
6 votes

‘python-shell-interpreter’ doesn’t seem to support readline

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-...
npostavs's user avatar
  • 9,203
5 votes

how to set ipython on a virtualenv?

Reading the docstring for the deprecated elpy-use-ipython, it points to that recommends the following setup for ipython: (setq python-...
Heikki's user avatar
  • 3,076
5 votes

orgmode - ipython output image not show in results

Your example works perfectly in my setup. First make sure ipython-ob is included in the babel-languages: in my case: (org-babel-do-load-languages 'org-babel-load-languages '((python . t) (...
manandearth's user avatar
  • 2,128
4 votes

multi line inputs in ipython

I realize it's an old question, but since it was left unanswered, I will bring the fix I found here after running into the same issue. Make sure your version of IPython is at least 5.4 Install ...
S4M's user avatar
  • 141
4 votes

IPython doesn't echo code input

This seems to be a somewhat 'intricate' problem. The problem is that Emacs uses python-shell-send-string to retrieve all kinds of information from the interactive shell in the background. One of the '...
dalanicolai's user avatar
  • 7,855
3 votes

run-python does not work if added to python-mode-hook

Check the arguments that run-python requires, and supply them in your hook function that calls it (use a lambda with interactive or a named command that you defined). Otherwise, if you want to ...
Drew's user avatar
  • 77.9k
3 votes

How to set up elpy to use python3?

Set the interpreter variable in your .emacs file: (setq python-shell-interpreter "python3" python-shell-interpreter-args "-i") Taken from elpy manual
init0's user avatar
  • 41
3 votes

elpy with ipython as rpc -- how to get good autocompletion

Elpy doesn't require emacs jedi package. Also they won't work well when both are configured. I guess there is some conflict between them. Use only elpy and you should be able to get completion in rpc ...
Chillar Anand's user avatar
3 votes

ob-ipython error

It looks like adding (package-initialize) (require 'ob-ipython) to my .emacs solved the problem!
falematte's user avatar
  • 423
2 votes

ob-ipython error

You need to update org-babel-load-languages. Try this: (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (ipython ....
scbagley's user avatar
  • 619
2 votes

Can't use Emacs IPython Notebook?

I believe the line should be (require 'ein)
Ryan's user avatar
  • 4,049
2 votes

Emacs freezes with ipython 5.0.0

ipython 5.0.0 by defautl uses prompt_toolkit which is really nice in a terminal but uses special characters for colors and completion that screws emacs display. Eventually it should be fixed but for ...
Lompik's user avatar
  • 1,224
2 votes

How to run blocks/cells of python code in emacs?

You can open a python process with M-x run-python or C-c C-p. Select the region (block) you want to execute and do a M-x python-shell-send-region or C-c C-r
djangoliv's user avatar
  • 3,199
2 votes

How to run blocks/cells of python code in emacs?

This package might be of use to you: It offers the ability to highlight cell borders, execute code cell-by-cell with the #%% syntax used to delimit cells, and ...
ygtozc's user avatar
  • 53
2 votes

Integrating jupyter notebook (ipython) into org-mode notebook

Check out ob-ipython: An Emacs library that allows Org mode to evaluate code blocks using a Jupyter kernel (Python by default), it might be what you are looking for. Run code on remote ipython kernels ...
user3496846's user avatar
2 votes

Is there a way to show python generated plots in the python interpreter console?

You may wanna checkout ein. Also, spacemacs has a ipython-notebook layer setup based on that; perhaps you can use that as a reference for your own config.
TerryTsao's user avatar
  • 1,216
1 vote

Weird shell output when using IPython 5

Simply using M-x term instead of M-x shell or M-x eshell solved my similar problem. The interface is actually better than eshell or shell. For example, for repeating the previous command just need the ...
neuroprinciplist's user avatar
1 vote

Weird shell output when using IPython 5

The error I got was similar garbled (wierd) text when I opened IPYTHON with C-c C-p on my simple python file print("hello World"). ppppprrrrriiiiinnnnnttttt((((("""""...
Pandian Le's user avatar
1 vote

ein failed to login to 8888

"GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) EIN only works on Emacs 25. See If perchance you use a Ubuntu derivative, ...
serv-inc's user avatar
  • 828
1 vote

Emacs python can not update imported files?

I have solved this problem. First method: In ipython console, type %load_ext autoreaload %autoreload 2 Second method: Create configuration "dev" (or whatever): ipython profile create dev [...
Zimou Zhang's user avatar
1 vote

How can I access the :file src header argument inside the src block

You could wrap the output with next code and create file and link after block #+name: attr_wrap #+begin_src sh :session :var file=/tmp/py87133eo.png echo "$data" > /tmp/$file ln -s /tmp/$file /...
Konstantin Morenko's user avatar
1 vote

python emacs interpreter doesn't pause for input in loops

This issue was brought up to the ipython team. It sounds unlikely that there will be progress from that side. One option they suggest is reinstalling ipython 4.x (for instance in an Anaconda prompt ...
Topher's user avatar
  • 26
1 vote

ein + ipython non-responsive with python 'raw_input'

I am using emacs 25.2 In my case I tink that this was the problem I solved setting up Python 3 and installing python-mode. Note that in Python 3 ...
Nisba's user avatar
  • 905
1 vote

Setting `python-shell-interpreter-args` causes slow python mode enabling

This is due to semantic-mode. It will call python-shell-internal-send-string which depends on python-shell-interpreter and python-shell-interpreter-args. Thus using a non-profile python-shell-...
Saddle Point's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible