10
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/<...
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 ...
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 ...
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 ...
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
‘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
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 ...
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 '...
3
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
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
2
votes
How to run blocks/cells of python code in emacs?
This package might be of use to you: https://github.com/astoff/code-cells.el
It offers the ability to highlight cell borders, execute code cell-by-cell with the #%% syntax used to delimit cells, and ...
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 ...
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.
1
vote
How to run blocks/cells of python code in emacs?
I use ein, which stands for emacs ipython notebook. It is the jupyter notebook implementation for emacs. See ein doc.
Just like jupyter you execute cells and get back the output. The cells are saved ...
1
vote
ob-ipython error message while evaluating SRC block
On my system, this error happens because my jupyter installation is based on python3, while python-shell-interpreter in emacs is python. This can be fixed by running M-S-: (setq python-shell-...
1
vote
Accepted
IPython doesn't work in a virtual environment
Referencing this issue from the elpy package, a solution to your problem may be adding the --simple-prompt and --pprint arguments to the python-shell-interpreter-args variable, like so:
(setq python-...
1
vote
Python-Repl issues with TRAMP Mode [windows->Linux]
Ended solving this by directly sending to the Python buffer. Hope it helps
(setq tiqsi-python-buffer "*Python*")
(defun send-py-line ()
(interactive)
(let ((py-temp (thing-at-point 'line t)))
...
1
vote
Accepted
Spacemacs Python Layer Invalid version syntax: '[?1034h4.0.0'
Ok, the lesson here is to take care with you system Python installation.
I had conflicting Python version installed alternately via brew and from Anaconda.
To resolve this I had to
/usr/local/bin/...
1
vote
Initialize ipython notebook server from .ipynb file
There is ein:jupyter-server-start, which should do as you want. It should drop you directly onto the notebook list, from which the notebooks are easily accessible.
If you are particularly lucky ein ...
1
vote
multi line inputs in ipython
You can use %cpaste and -- to tell ipython to expect multiple lines:
In [1]: %cpaste
Pasting code; enter '--' alone on the line to stop or use Ctrl-D.
:def foo():
: return 1
:
:--
Alternatively, ...
1
vote
Accepted
Error when opening IPython notebook list using EIN
There is a current EIN that took over. On Emacs 25, it works out of the box.
Usage
Install from MELPA. For manual install, put Emacs lisp ein*.el files and Python file ein.py in your ...
1
vote
Emacs EIN vs IPython shell
There is a new version of EIN that replaced the old one on MELPA.
On Emacs 25 and up, it works out of the box. Emacs 24 needs to upgrade, though, see https://github.com/millejoh/emacs-ipython-...
1
vote
ein failed to login to 8888
I ran into this problem and found that the issue was with the token that jupyter notebooks now use. I disabled the token per this GitHub issue. I'm reproducing the instructions below:
cd ~/.jupyter
...
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 https://github.com/millejoh/emacs-ipython-notebook/issues/190.
If perchance you use a Ubuntu derivative, ...
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
[...
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 /...
1
vote
Accepted
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 ...
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
https://github.com/syl20bnr/spacemacs/issues/8797
I solved setting up Python 3 and installing python-mode.
Note that in Python 3 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ipython × 89python × 46
elpy × 10
ein × 10
spacemacs × 8
org-mode × 7
jupyter × 7
shell × 5
comint × 5
microsoft-windows × 4
completion × 4
org-babel × 3
debugging × 3
repl × 3
buffers × 2
tramp × 2
hooks × 2
auto-complete-mode × 2
process × 2
anaconda-mode × 2
inferior-buffer × 2
inferior-python-mode × 2
init-file × 1
indentation × 1
osx × 1