Questions tagged [elpy]

Elpy is an Emacs package to bring powerful Python editing to Emacs. It combines a number of other packages, both written in Emacs Lisp as well as Python.

Filter by
Sorted by
Tagged with
1
vote
1answer
38 views

Give key binding absolute priority [duplicate]

I'd like to use M-<arrows> to move around windows in Emacs gtk, so I have added (windmove-default-keybindings 'meta) to my init.el. However, this is overridden by other modes such as elpy. Is ...
0
votes
0answers
9 views

What are the steps to set up elpy to use the anaconda python distribution on Windows?

I have anaconda installed on Windows (Windows 7), and it is working well in Jupyter. But of course I'd prefer to work in emacs. I have elpy installed in emacs, and it successfully sends commands to ...
0
votes
1answer
14 views

How to deselect a symbol selected by `elpy-multiedit-python-symbol-at-point` for renaming?

I wanted to rename a variable, so I selected all its uses by C-c C-e (elpy-multiedit-python-symbol-at-point) and changed its name. How do I deselect it so that changes in one line don't appear in ...
0
votes
0answers
28 views

Unable to call pyvenv-activate from init file

M-x pyvenv-activate <RET> ~/Documents/bitbucket-python-scripts/.env353 <RET> works fine. Elpy Config buffer confirms that. However with the following in ~/.emacs file (require 'package) ...
0
votes
0answers
31 views

Get autocomplete information from inferior python process

When using pandas, I can get dot completion to work for column names in the inferior python process but not in my file. Is there any way to link the two? I am using elpy for my python work. This is ...
1
vote
0answers
84 views

Elpy auto-complete gives incomplete suggestions

I am trying to use Elpy for Emacs to write Python programs. The auto-complete feature suggests all attributes of PyQt5 classes, but suggests only a subset of the attributes of instances of these ...
1
vote
0answers
43 views

Associate a buffer with a process

I am using Python with elpy. I am trying to use a Python shell opened on the remote computer using a shell buffer. I can cheat elpy by renaming the shell buffer with Python running in it to *Python*. ...
0
votes
1answer
41 views

Elpy keeps prepending backslash to my python path

I am trying to set my Elpy on my home machine and, so far, everything works except actually running the Python interpreter. I normally launch the interpreter and run code via C-c C-c, but when I do ...
0
votes
1answer
74 views

Autoinsert a python skeleton

I start my python files (.py) with #!/usr/bin/env python3 and sometimes if __name__ == '__main__': somefunc() having done it some hundreds of time manually I decided to automate it in Emacs. (...
2
votes
0answers
100 views

Executing buffer twice in Python 3

I set up an environment to write Python 3 Code in my emacs (25.2.2) using python-mode and Elpy on Ubuntu 18.04. Strangely every time I use Python --> Send --> Execute Buffer the program is executed ...
3
votes
0answers
44 views

xref gets confused by similar class names

If I use evil-jump-to-tag or xref-find-defintions on an inherited class module whose name is the same as a class in my current project, I am taken to the definition in the current project. I would ...
0
votes
0answers
91 views

elpy autocomplete stops working unexpectedly

I've configure emacs to write python code and I love it!:). It works very well but after some situations that I cannot understand the autocomplete stops working on all buffers. If I restart emacs it ...
1
vote
1answer
560 views

Activating a conda environment in emacs

I've got code that needs python 2.7 (and other environments) C:\Users\Me>conda info -e # conda environments: # base * C:\Program Files\Anaconda3 python2 C:\...
1
vote
0answers
396 views

Enhance python lsp-mode with elpy functions and keybindings

I've been using Elpy for a long time and have grown used to many of the default keybindings. I recently decided to give lsp-mode a go to see how it compares. I set it up following this blog and made ...
1
vote
0answers
128 views

Org Mode Python block evaluation cannot print result in the shell session

I have a python source block in org mode as below #+BEGIN_SRC python :session print('hello world') #+END_SRC and I have a Python shell already run, so when i press C-c C-c, the code gets ...
1
vote
1answer
151 views

Why does company autocomplete 1000 to “and”?

When writing python code in Emacs (GNU Emacs 25.1.1 x86_64-pc-linux-gnu), I use company for auto completion. Why does company autocomplete (some) numbers to keywords? Edit: I used M-x company-diag ...
1
vote
1answer
48 views

How to debug collision between elpy and htmlize during org-export

Description Below I include a minimal Emacs init file a minimal org file Attempting to export the org file to HTML (by using C-c C-e h h) results in the error Wrong type argument: processp, nil. A ...
2
votes
0answers
63 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 ...
1
vote
1answer
171 views

How to move elpy interactive python shell from bottom to the side?

I am using elpy as a python development environment. when I run a code in interactive python shell it shows the output in the bottom of the window. Can I move this bottom interactive python shell to ...
5
votes
1answer
514 views

flymake : How can I modify/ignore syntax and styling rules?

I'm using elpy to code in Python, along with flymake to help with style/syntax checking. The problem being that I have my habit, and I like to sometimes put 2 blank lines between methods of the same ...
3
votes
2answers
1k 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 ...
2
votes
2answers
2k views

elpy not picking up virtualenv

I use elpy with: (setq python-shell-interpreter "/usr/bin/python3") (setq elpy-rpc-backend "jedi") I need now to work on a virtuaelnv. If I start it in a terminal and then edit the source code with ...
2
votes
1answer
240 views

Elpy starts Python processes at the root of my git tree, not the module's actual location

(I now submitted this as an issue in GitHub: https://github.com/jorgenschaefer/elpy/issues/1249) I'm using Emacs 25.3.1, Elpy v20171212.850, and Python 3.6.3 on MacOS 10.13.2 . I have a project ...
1
vote
1answer
92 views

Matching key-bindings between modes

I'm new to emacs, and I'm trying to set it up as my editor for both python and R. Elpy and Ess are both great, and I'm relying on them a lot. However, I'm used to the Ess key-bindings, and would like ...
0
votes
0answers
244 views

No Match on elpy

I am trying to install elpy. I added the lines (require 'package) (add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") ) (package-initialize) (elpy-...
3
votes
0answers
78 views

how to highlight imported functions in python code?

python-mode or elpy-mode in Emacs only highlight the basic Python library functions. If you work a lot with other libraries like numpy and matplotlib, would be nice to have these functions and ...
0
votes
1answer
395 views

Menu bar drop-downs empty

I am using Emacs 25.3.2 on Linux Ubuntu 16.04. The problem is that several of the menu bar items produce empty drop-downs. A grey box appears, but with nothing inside. It looks like this: I ...
2
votes
1answer
2k views

Autocomplete not working

Elpy Configuration Virtualenv........: None RPC Python........: 2.7.10 (/usr/bin/python) Interactive Python: ipython (not found) Emacs.............: 25.2.1 Elpy..............: 1.16.0 Jedi...........
3
votes
1answer
236 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 ...
1
vote
0answers
127 views

Elpy Autocomplete in org-edit-special

I'm using org-babel with python source blocks to put break my code into sections. The issue I'm having is I don't get any autocomplete suggestions based on the code in other blocks. Is there any ...
0
votes
1answer
171 views

Cannot find elpy-format-code

I have yapf installed, and would like to run it automatically. Documentation says there is a way: http://elpy.readthedocs.io/en/latest/ide.html#command-elpy-format-code but I don't see it in the ...
4
votes
1answer
407 views

Elpy Dependecies in Virtual Env

Elpy is dependent on a few python packages like jedi, yapf, etc. However when I create enter a new virtual env and enter it using pyvenv-activate elpy is unable to find those packages without me ...
0
votes
1answer
399 views

UnicodeEncodeError executing python in Emacs - not in Terminal

I have a python file which defines a function and calls it. def remove_whitespace(input_file, output_file): with open(input_file) as f: f.readlines() # do something If I execute ...
6
votes
4answers
2k views

How to start python shell in appropriate working directory?

If I am editing a python file, and start a python shell using elpy-shell-switch-to-shell the process appears to set the working directory as the containing directory of the file. However, the file ...
4
votes
3answers
2k views

Emacs 25.1 & Python 3.6.0 Integration [Newbie]

Preface: I've been dabbling with python programming for a mere few months now. Previously, I spent most of my programming time using C# with Visual Studio. In the Python world, I've been using ...
5
votes
1answer
714 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 ...
3
votes
2answers
1k views

elpy [No match] when installing package

I'm trying to follow the instructions in the README of this repo: https://github.com/jorgenschaefer/elpy . Everything goes smoothly until I get to the point where I am to install the package. After ...
2
votes
0answers
118 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 ...
0
votes
1answer
114 views

Why do I have two completions when editing python file?

As in the picture, when I editing python file, there are two completions. Why is that? Thank you very much. Following are my init.el related to elpy and completion: (elpy-enable) ;;(setq elpy-rpc-...
0
votes
1answer
459 views

problem generating python plots

I am very new to emacs and I can't figure out why my plots doesn't appear, I have ein and elpy installed, my code runs but I just can't see the plot. I installed the packages in M-x list-packages. ...
1
vote
2answers
842 views

Make elpy-shell-send more intelligent

How can I modify (or replace) elpy-shell-send-region-or-buffer (bound to C-c C-c) to behave like ess-eval-region-or-function-or-paragraph-and-step, i.e. if region is active, evaluate it (this ...
5
votes
1answer
237 views

Docstrings don't automatically indent themselves in elpy-mode. How do I fix this?

This is an example function that shows that docstrings do not automatically indent. def testing_docstring(): """ docstring is not indented automatically! Even after a newline. """ ...
0
votes
1answer
2k views

emacs: reinstall package after installation error

I'm new to Emacs. I needed to install the elpy package for python (as described here), but as I forgot to install one python package with pip, the installation with M-x package-install RET elpy failed....
3
votes
0answers
847 views

How to use the auto-completion of jedi while keeping other functions of elpy?

Currently, I have both elpy and jedi installed. init.el is like: (elpy-enable) (elpy-use-ipython) (setq elpy-rpc-backend "jedi") (add-hook 'python-mode-hook 'jedi:setup) (setq jedi:complete-on-dot t)...
2
votes
0answers
296 views

Unexpected Indentation in Python interpreter

I am getting an indentation error in the Python interpreter while using elpy: >>> for i in range(1, 3): ... print(i) File "<stdin>", line 1 print(i) ^ IndentationError: ...
3
votes
2answers
655 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 ...
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 "...
0
votes
1answer
882 views

Problem to install/setup elpy

I am trying to install elpy on my machine (ubuntu 14.04), but getting the following issue. any comment, hint? Thanks. Requirement already satisfied (use --upgrade to upgrade): elpy in ./work/...
2
votes
1answer
2k views

How to customize the line character length in elpy?

I am using elpy for my Python development, but I would like to set the per-line character limit to 120 instead of the default 80 used by PEP8. Any suggestions on how I can do this? Even better, it ...
5
votes
2answers
2k views

Function to restart python console

I wrote a very simple function to properly restart ipython console with elpy when evaluating the buffer or region: (defun my-restart-python-console () "Restart python console before evaluate buffer ...