47
votes
Accepted
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"
...
23
votes
How to set up elpy to use python3?
You can conffigure elpy-rpc-python-command. If you want Python3 you can set it like this.
(setq elpy-rpc-python-command "python3")
Update
Create python3 virtualenv using virtualenvwrapper from ...
13
votes
Accepted
Where is the python.el documentation?
You can visit the file python.el.gz which defines the mode doing M-xfind-libraryRETpythonRET. The commentary at the beginning of the file is pretty comprehensive.
9
votes
Emacs EIN vs IPython shell
You are correct that ein at tkf's repository on github only works with versions of IPython prior to 2.x.
With that said, however, if you use this version you will find that it works with IPython 2.x ...
9
votes
Accepted
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/<...
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 ...
8
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 ...
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* ...
6
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 ...
5
votes
Accepted
Running two IPython instances at the same time
Yes, that's possible. Add the following code to your init-file (note that you might have to adapt /usr/bin/ipython2 and /usr/bin/ipython to point to appropriate executables for IPython 2 and IPython 3,...
5
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-...
5
votes
Accepted
how to set ipython on a virtualenv?
Reading the docstring for the deprecated elpy-use-ipython, it points to https://elpy.readthedocs.io/en/latest/ide.html#interpreter-setup that recommends the following setup for ipython:
(setq python-...
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)
(...
4
votes
Accepted
Emacs 24's python.el + ipython cannot complete module names
How to Debug?
It's tough to spot until you know what you're looking for, but in the middle of the stacktrace you see that the byte-compiled functions are calling python-shell-completion-get-...
4
votes
Emacs EIN vs IPython shell
I think EIN's main value was to be able to connect arbitrary buffers to the ipython kernel that corresponds to the notebook, therefore enabling cooperation of multiple Emacs "objects".
But since EIN'...
4
votes
Accepted
How do I automatically truncate a growing buffer?
You need to add the function comint-truncate-buffer to the hook comint-output-filter-functions, like so:
(add-hook 'comint-output-filter-functions #'comint-truncate-buffer)
By default, the buffer ...
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 ...
3
votes
Accepted
ob-ipython error
It looks like adding (package-initialize) (require 'ob-ipython) to my .emacs solved the problem!
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 ...
3
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 ...
2
votes
Accepted
working setup for ipython in babel
The problem is that you cannot directly paste code into an ipython session. A post on the Org mailing list by Arun Persaud gives a workaround that employs the %cpaste magic command. Here is a ...
2
votes
Accepted
Replicate ipython history behaviour in Emacs
Not sure which ipy mode, You are referring. I use ipython shell which comes with elpy. It also has the same problem.
By default up arrow (or M-p) are bind to (comint-previous-input ARG). So no ...
2
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
2
votes
Emacs Ipython Notebook - What is determining inline plot background?
this was discussed on the emacs-ipython-notebook github recently.
https://github.com/millejoh/emacs-ipython-notebook/issues/41
It seems like a bug in iPython, but for the moment there is a work ...
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 ....
2
votes
2
votes
Accepted
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 ...
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 ...
1
vote
ipython not working in org mode
You can try setting the python interpreter to ipython with:
(setq org-babel-python-command "ipython")
And then just use python with begin_src:
#+BEGIN_SRC python :session myip
%matplotlib inline
...
1
vote
Problem working with python/pygame
This doesn't seem to be a problem with python-mode but with your python instance.
This link goes into more detail, but it boils down to something has crashed. From the description you've given it ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ipython × 81python × 43
elpy × 10
ein × 8
org-mode × 7
spacemacs × 7
jupyter × 5
microsoft-windows × 4
shell × 4
comint × 4
org-babel × 3
debugging × 3
repl × 3
buffers × 2
tramp × 2
completion × 2
auto-complete-mode × 2
process × 2
anaconda-mode × 2
inferior-buffer × 2
init-file × 1
indentation × 1
osx × 1
window × 1
hooks × 1