Questions tagged [ipython]

IPython is an interactive shell for Python.

Filter by
Sorted by
Tagged with
37
votes
2answers
7k views

Weird shell output when using IPython 5

I just upgraded to the latest version of IPython and now something is wrong when using it in emacs. When using it in a regular terminal it works fine (colors, tab-completion, etc.), however either ...
22
votes
3answers
17k views

How to set up elpy to use python3?

When setting up my emacs for a new work environment, I am unable to get the elpy configuration to correctly use python 3. I have installed all of the required packages in /usr/local/bin and have ...
10
votes
3answers
3k views

Emacs EIN vs IPython shell

I'm trying to make EIN work within Emacs, but right now (with IPython 2) it seems that it's not possible. This errors arise: REQUEST [error] Error from parser ein:json-read: (json-readtable-error) ...
8
votes
2answers
1k views

Integrating jupyter notebook (ipython) into org-mode notebook

is there a way I can link in jupyter notebooks (ipython) into the org-mode notebook? The same way other files (images) can be brought in? If it is possible will the outputs are also seen in the note (...
7
votes
1answer
729 views

working setup for ipython in babel

Can someone point me to a working setup for using babel with IPython? I'm witnessing strange indentation behavior when I try to define functions. This happens whether or not I specify the --classic ...
6
votes
1answer
3k views

Running two IPython instances at the same time

I'd like to run two instances of IPython in Emacs at the same time, one with Python 2, and the other Python 3: is it something doable or there's something in the way python.el is designed that would ...
6
votes
1answer
1k views

Emacs 24's python.el + ipython cannot complete module names

I'm using Emacs 24.4.1 on OSX (installed with Homebrew), with the built in python.el, and Python 3 (also installed with Homebrew), along with IPython 2.3.0. I have this in my .emacs: (setq python-...
5
votes
1answer
1k views

Where is the python.el documentation?

I am using emacs-24.3, which comes with python.el and IPython support out of the box (or so they say). Is there documentation for this mode? Where can I find it?
5
votes
1answer
5k views

Spacemacs use anaconda environment

I have anaconda environments for python2 and python3 as I have code written in the different versions In spacemacs (with python layer installed), when I open ipython (SPC m s i) it starts with my ...
5
votes
1answer
762 views

Ipython completion in elpy

My elpy uses ipython as the interactive interpreter. It does not, however, emulate ipython's history-informed autocomplete feature (for lack of a better term). That is: within an ipython session ...
5
votes
2answers
3k views

multi line inputs in ipython

Say, I typed In [1]: def foo(a, b): ...: return a+b ...: in the normal, non-emacs ipython shell. Pressing the up arrow key afterwards, allows me to get the complete multi-line input back which ...
5
votes
2answers
862 views

Emacs Ipython Notebook - What is determining inline plot background?

I have been trying to figure out what attribute is setting the background for inline plots in EIN. The background for the plot seems to always take the default background color for my color theme, ...
5
votes
1answer
102 views

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

I'm wondering how to access the :file header argument passed to a src block, from inside the src block itself? I'm wondering specifically for python, and in this case ipython with %matplotlib inline ...
5
votes
0answers
538 views

show output from python-shell-send-region

Using python.el and ipython.exe (from Miniconda3), I'd like to highlight a portion of code and execute it in the associated inferior python buffer. Example: #!/usr/bin/python3 myvar = 100+200 ...
5
votes
0answers
2k views

Emacs IPython prompt symbol is garbled

I just installed Fedora 24 with Emacs and IPython. When I launched the IPython shell in Emacs, the prompt symbol, which should be "In [1]", is displayed as "^[[?12l^[[?25h". Is there a way to solve ...
4
votes
1answer
505 views

Replicate ipython history behaviour in Emacs

Say, we've entered the following in the normal ipython shell. In [1]: 1+1 Out[1]: 2 In [2]: 1+2 Out[2]: 3 In [3]: 2+4 Out[3]: 6 If I now enter: In [4]: 1+ and press the up arrow key, ipython ...
4
votes
0answers
301 views

list of current variables in a buffer for Python code

I would like to find a way to reproduce the "Workspace" of Matlab or the equivalent "Variables" window of the awesome pudb debugger directly in emacs for python code: it is a window which details the ...
4
votes
1answer
307 views

Inferior Python shows not output, or input

I have the symptoms described here Input and Output does not show up in python mode, except this happens with python3 as interpreter as well as ipython, and I've tried the suggestions there for fixing ...
4
votes
1answer
432 views

Problem of starting a remote ipython console

I want to connect to remote ipython server, and follow the doc of the ipython, I start a ipython server in my server by ipython3 kernel -f ~/.ipython/kernel.json --pprint and I can start a ipython ...
3
votes
2answers
2k views

how to set ipython on a virtualenv?

I'm using elpy for my python coding. I wanted to try ipython because of the nice built in profilers. So what I've done is to install ipython within my virtualenv. It works correctly. I then added the ...
3
votes
2answers
709 views

ob-ipython error

I have Installed from Melpa ob-ipython on Ubuntu Xenial with Emacs 24. If I try to evaluate a source code like: #+BEGIN_SRC ipython :session %matplotlib inline importmatplotlib.pyplot as plt inport ...
3
votes
2answers
2k views

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

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 ‘...
3
votes
2answers
684 views

Emacs freezes with ipython 5.0.0

My problem is Emacs with elpy, specifically with (elpy-use-ipython) in my init file. When I try to open a python file, emacs freezes. I desactivate ipython and emacs runs well. But I wanna use ...
3
votes
1answer
598 views

ob-ipython error message while evaluating SRC block

I am getting this error when executing any source ipython block such as this one: #+BEGIN_SRC ipython :session :results output drawer # Compute areas and colors import numpy as np import matplotlib....
3
votes
1answer
140 views

ein + ipython non-responsive with python 'raw_input'

I am using Emacs with the ein package to edit ipython files. Everything works fine except when I have a line like: fhandle = raw_input('enter your file name: ') to prompt for a file name. The ...
3
votes
1answer
977 views

Input and Output does not show up in python mode

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 ...
3
votes
1answer
294 views

Initialize ipython notebook server from .ipynb file

Is it possible to open EIN notebook as file, so it automatically takes care of starting ipython notebook server?
3
votes
2answers
447 views

Wrapping Python code with %cpaste and — to send to iPython in elpy

I am loving my elpy setup in emacs, but I have one question. When I put in a ipdb.set_trace() for the ipython shell I want to send code snippets to the iPython shell. Right now my workaround is ...
3
votes
1answer
255 views

ipython in emacs: Figure windows “not responding” on Windows 7

I am trying to get a good setup to do scientific python on windows 7. To be complete, I am using Anaconda for Python package management, and emacs 25.2 (the native windows build from GNU, not the ...
3
votes
0answers
143 views

Remove extra prompts in inferior-python-mode with ipython

emacs24.5 -Q M-: (setq python-shell-interpreter "ipython") RET M-x run-python RET Python 3.5.1 (default, Dec 7 2015, 12:58:09) Type "copyright", "credits" or "license" for more information. ...
2
votes
1answer
366 views

How do I automatically truncate a growing buffer?

I want to run IPython in emacs for all the emacsy goodness I get, but I'm having a problem getting the buffer to automatically truncate (it gets slow quickly printing large dataframes and such). It ...
2
votes
1answer
420 views

Dedicated Python Shell?

I just upgraded emacs to 25.3. Before the upgrade when I opened a Python shell, it would ask me whether I wanted a 'dedicated' shell (for the buffer I was in), to which I usually replied 'yes'. Now, I ...
2
votes
1answer
1k views

elpy with ipython as rpc — how to get good autocompletion

I'm using elpy with emacs and python3. Here's the relevant part of my .emacs: ;; PYTHON (elpy-enable) (setq elpy-rpc-python-command "python3") (elpy-use-ipython "ipython3") (autoload 'jedi:setup "...
2
votes
1answer
156 views

How do I filter for IPython prompt characters on Mac OS? [duplicate]

I've debugged to this point: OS X El Capitan (10.11.5) Emacs 24.5.1 with Cocoa (installed from homebrew) python.el 0.24.5 Python 3.5.1 IPython 5.0.0 I've configured IPython to use NoColor mode in ...
2
votes
1answer
609 views

ipython not working in org mode

I've followed everything here in order to set up ipython in org mode. But I keep getting the error: ...executing Ipython code block... apply: Searching for program: no such file or directory, ipython ...
2
votes
1answer
64 views

Force append to buffer instead of at point

Is it possible to force an Emacs buffer to place any new text it receives at the end of the buffer, instead of at the mouse point? I mean all of: keystrokes, yanks, mouse paste. I'm thinking in ...
2
votes
1answer
316 views

Process Python not running on ob-ipython

I think I must be missing something silly. I am trying to use ob-ipython in my org-mode files. When I press C-c C-c I get Process Python not running. Do I need to startup some process or something ...
2
votes
0answers
72 views

Disable ipython show output in minibuffer

I am using Ipython 3.6.3 with Emacs(elpy enabled) 25.2.2 on Kubuntu 17.10. I realize that sometimes output of Ipython keep showing at minibuffer, which is very annoying. But, I cannot find the value ...
2
votes
0answers
596 views

debugging: how to optimize a RealGUD workflow

I code in Python and I my workflow uses debuggers (I coded for 8 years in Matlab). I develop numerical simulation codes: most of the time it returns a result, the question is: "Is the result right?" ...
2
votes
0answers
162 views

Output of ipython shell much slower than python shell

Even turning off font-lock-mode and set (setq python-shell-font-lock-enable nil), the output of an ipython shell (setq python-shell-interpreter "ipython") seems much slow than the python shell (...
2
votes
0answers
124 views

Lisp error with elpy under Python 3

I've had my emacs (v. 25.1.1) working with elpy (1.13) under Python 2.7 for a while. I decided to switch to Python 3 recently, and cannot get it to interact with emacs properly. Normally, when I ...
2
votes
1answer
563 views

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

I have a ipython config which imports lots of packages. I also have some configs in my python setup like (setq python-shell-interpreter "ipython3" python-shell-interpreter-args "-i --...
1
vote
1answer
355 views

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

I would like the Python inferior process to start (if it is not already running) whenever I create a python-mode buffer (for example, by visiting a .py file). Some functions in anaconda-mode etc. ...
1
vote
1answer
446 views

orgmode - ipython output image not show in results

I use below org code to draw a graph, but the graph not show on results block: #+BEGIN_SRC ipython :results drawer :session py2session %matplotlib inline import numpy as np import matplotlib.pyplot ...
1
vote
1answer
115 views

realgud ipdb how to highlight line being debugged

I debug a python source file with M-x realgud:ipdb then call ipdb as python3 -m pdb <sourcepath> <args> I get 2 windows: ipdb ... shell and my source buffer. How can I get the line ...
1
vote
2answers
77 views

Ipython code block producing org table

I saw a python code block example to output an array as an org-table. An example would be, #+BEGIN_SRC python :results value r = 3389.5 # km average radius re = 3396.2 # equatorial radius in km ...
1
vote
3answers
920 views

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

https://i.stack.imgur.com/TIxlR.png The picture shows what I mean by "block" - I mean a cell of code that is delimited by some sequence of characters, in this case '#%%', that can be executed by the ...
1
vote
1answer
274 views

IPython doesn't work in a virtual environment

I've set up a virtual environment with venv and installed Ipython there via pip. On the terminal it works. Now, in my init.el, I have (setq python-shell-interpreter "ipython" python-shell-...
1
vote
1answer
240 views

Indentaion in inferior-python-mode

In Python mode (python.el), I am in the habit of hitting C-j to return and indent properly. However, when I am in an inferior python buffer, this command only inserts a newline and does not indent. Is ...
1
vote
1answer
367 views

emacs always calls ipython with matplotlib

I'm trying using ipython in emacs. I installed python-mode and config ipython: (require 'python-mode) ; use IPython (setq-default py-shell-name "ipython") (setq-default py-which-bufname "IPython") (...