Questions tagged [elpy]
Elpy is an Emacs package to bring powerful Python editing to Emacs. It combines a number of other packages, written in Emacs Lisp as well as Python.
135 questions
0
votes
0
answers
34
views
Emacs: Elpy: Popup suggestions menu not displayed in ipython shell (getting suggestions in *Completions* buffer instead after pressing `TAB`)
I am using Emacs 30.1 on MacOS and have configured Elpy. The auto complete
popup is working properly in python file (for e.g. typing 'a'.l shows me below popup ).
However, when I type 'a'.l in the ...
0
votes
0
answers
37
views
Getting a start-process: Spawning child process: Exec format error while running python (elpy)
I'm running python 3.12 at work on windows using emacs as IDE. At home I'm running linux where my setup works without any issue. However, at work with windows I struggle to get it properly run.
I have ...
0
votes
1
answer
103
views
Cannot get elpy to find jedi in my venv even though it is installed via pip and via melpa
I've been struggling to setup a python IDE elpy in emacs 27.1 on Ubuntu 22.04, but I'm running into issues.
I got a fresh install of Emacs (fixed the issues with expired GNU gpg keys) and installed ...
0
votes
1
answer
73
views
fix project root for elpy
I have following in the settings file:
(setq elpy-project-root "~/Development")
But it doesn't work. I have to explicitly from within emacs have to call elpy-set-project-root which works. ...
1
vote
1
answer
70
views
Emacs: elpy-shell-send-region-or-buffer is not using Python virtualenv
I am using GNU Emacs 29.3 on Windows 11 and have configured Elpy manually. I am a beginner in Elpy. It seems to be working as expected. I can see the auto-completion and documentation hints.
However, ...
0
votes
0
answers
253
views
"Package `elpy-' is unavailable with GNU Emacs 27.1 on Ubuntu 22.04
A couple of weeks ago I did a re-install of my Ubuntu and now I'm running into issues with my init file. See screenshot below.
I'm quite puzzled, probably something trivial, but I'm missing it ...
I'...
1
vote
1
answer
123
views
What is the Elpy "autodoc" module and how do I enable it?
In the documentation for Elpy 1.35, near the part about elpy-doc, there is a statment to the effect of
If the autodoc module is enabled (not by default) ...
What is the autodoc module, and how does ...
1
vote
0
answers
80
views
How can I figure out why elpy-doc fails to find documentation?
I have Elpy version 1.35.0 in Emacs 28.2. I'm trying to use elpy-doc on functions in modules that my Python program imports. I know that the functions have docstrings (because I wrote those modules), ...
3
votes
6
answers
625
views
__PYTHON_EL_eval_file prints in interpreter when sending python file from buffer using C-x C-l
Whenever I send the a Python buffer to the interpreter via C-x C-l it prints the file eval call as shown below. While it does print the correct output, it's a bit annoying to see it every time and I'd ...
0
votes
1
answer
275
views
elpy/pyvenv: "JSON readtable error: 80"
Trying to use elpy, I cannot get to run neither elpy-config nor pyvenv-workon commands that I get this error message in the minibuffer.
Steps:
open a python file
M-x pyvenv-workon RET dev RET where ...
1
vote
1
answer
94
views
How to have an elpy breakpoint in a different file
When running tests or scripts using elpy, I would like to set a breakpoint in a different file than the file that is the start of execution. However, from documentation, I see I can only set a ...
3
votes
2
answers
126
views
Python on Emacs taking space on disk
I'm kind of a newbie and want to use Python on Emacs.
I noticed that there is a folder rpc-venv here:
/Users/user/.emacs/elpy/rpc-venv/lib/python3.7/site-packages
Where all python packages are ...
1
vote
0
answers
262
views
Flymake: how can I modify/ignore syntax and styling rules?
This question was asked before here, but the solution doesn't work. It could be because I am not restarting flymake correctly.
The question is: how to have flymake ignore certain errors and warnings? ...
4
votes
1
answer
350
views
elpy tries to make a virtual env, but fails and starts complaining, very much complaining
I have installed elpy tonight, but it seems that it cannot start properly a Python virtualenv, and it's complaining as reported below.
First, I installed use-package and elpy from Melpa, and I added, ...
1
vote
1
answer
1k
views
Type / Annotation hints with lsp. Working example?
Can somebody who has made type hints work give the init.el example that shows how? And provide description of how it works for you inside Emacs?
I gather that some people have successfully moved from ...
2
votes
0
answers
176
views
No autocomplete in interactive python
OS: Windows 10
Emacs: 28.2
Python: 3.10
Package: elpy
My init.el:
...
(elpy-enable)
;; Use IPython for REPL
(setq python-shell-interpreter "jupyter"
python-shell-interpreter-args "...
9
votes
1
answer
5k
views
elpy error in process sentinel
I've gone a long way to get emacs set up at my company. At home I'm using Emacs for many years on Linux. However, at work on Windows I'm struggling a bit getting it functioning smoothly.
When use ...
1
vote
1
answer
893
views
elpy installed in the virtual environment, but elpy-config says Not Found
I am running emacs-28.1 and starting of with elpy. My current python development section is as follows:
(use-package elpy
:ensure t
:defer t
:init
(setq elpy-rpc-python-command "python3&...
0
votes
1
answer
3k
views
How can I add the current directory to `PYTHONPATH` automatically?
I use elpy and I am not able to use relative paths to access files because the PYTHONPATH doesn't include the directory I'm in by default. I may have set it up wrong in elpy-config. Here are my paths ...
1
vote
2
answers
213
views
Symbol's function definition is void: python-font-lock-assignment-matcher
My emacs won't start properly any more. The basic, unmodified interface is opened with the following error:
Warning (initialization): An error occurred while loading ‘/home/qohelet/.emacs’:
Symbol's ...
2
votes
1
answer
958
views
py-autopep8-enable-on-save is deprecated! use [py-autopep8-mode] instead!
I'm getting the message
py-autopep8-enable-on-save is deprecated! use [py-autopep8-mode] instead!
in the messages on startup. How to properly update it?
GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, ...
2
votes
0
answers
172
views
IPython interpreter for conda environments on Windows 10
I am using Anaconda3 for managing my environments and the IPython interpreter in Emacs. When activating an environment with pyvenv-activate the completion in the IPython interpreter is not working and ...
0
votes
1
answer
280
views
flake8 in elpy does not recognize per-file-ignores
I'm using the excellent Elpy. I have with a Python project with a .flake8 config file at the top of the project source tree. I have this content in the .flake8 file:
[flake8]
ignore = E251, E501, E303,...
2
votes
1
answer
265
views
elpy on Windows: M-x elpy-config results in "Neither easy_install nor pip found"
I have trouble to get elpy working on Windows 10 with Emacs 27 (Downloaded from http://ftp.gnu.org/gnu/emacs/windows/emacs-27/emacs-27.2-x86_64-installer.exe).
When I do M-x elpy-config I got the ...
0
votes
1
answer
70
views
elpy - package import fails when jupyter notebook is in the same directory
Problem
Python import fails when there is a jupyter notebook files in the same directory.
Files
$ cat a.py
from b import (
test
)
test()
$ cat b.py
def test():
print("hoge")
...
0
votes
0
answers
174
views
Elpy not working with python 3.10
It seems elpy doesn't work with python 3.10. For instance, see the issue here posted on the elpy repo in github. I had the same problem as that person mentions, and it seems many other people too when ...
0
votes
2
answers
344
views
Using elpy in my dotemacs file
I am trying to use the elpy python package by putting it in my dotemacs file. But, when I fire up an emacs session and type inside the source code frame ( I don't split any frames ), I get the ...
1
vote
2
answers
147
views
How to automatically enable `rst-mode` in SciPy documentation via Elpy?
I am currently trying to make Elpy into my ideal Python IDE, and besides inline images in the console, I am mostly there (I don't need much).
C-c C-d (M-x elpy-doc) brings up documentation for the ...
0
votes
0
answers
173
views
Elpy cannot access Pydoc documentation for non-builtin packages
I am using Emacs 27.2 on up-to-date Fedora 34 and I installed Elpy from, as I recall, melpa. Python version (in /usr/bin/python) is 3.9.7. I am trying to use C-c C-d to access Python documentation. ...
1
vote
1
answer
91
views
Get company to sort single underscore before double underscore, specifically with elpy/python-mode
Edit: this question is a duplicate of this one; I'm leaving it because I got a helpful answer and I didn't find the other one after reasonable amount of searching (so I hope this one being here will ...
1
vote
0
answers
220
views
Run current py-file
Maybe I am wrong to think that elpy is or should be able to do that.
But can't I just run the current (means: open in current active buffer) py-file?
I read about C-c C-c. But this just open a new ...
1
vote
1
answer
229
views
How to toggle the *Python* buffer?
When working on python code in elpy, I like to have the python shell open.
Often I don't want the *Python* buffer to be visible, especially with several buffers with Python code or long Python files ...
1
vote
1
answer
164
views
evil/elpy: Auto-fold when opening a file
I am using Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian with elpy and evil-mode.
When I open a py-file I want everything ...
0
votes
0
answers
19
views
How to dive into the code-folding topic [duplicate]
I am sorry for such a broad question but I have no other idea.
I am using Emacs with evil-mode and elpy (for Python files). Not all keyboard shortcuts known from vim are working.
When I ask the search ...
0
votes
0
answers
54
views
Autocompletion broken after loading certain module
I'm using Emacs (GNU Emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.22.30)
of 2019-05-11) on CentOS 8 and want to use autocompletion when coding with python.
Emacs.............: 26.1
...
1
vote
1
answer
232
views
I do not want a TAGS table, flaky elpy-goto-definition
I use elpy for python development, and the command M-., elpy-goto-defintion to follow a function to its definition in a python project is a life-saver.
There isn't a TAGS table anywhere in my project, ...
0
votes
1
answer
234
views
Running elpy-test on a file opened over ssh via tramp
I'm trying to run elpy's C-c C-t to do elpy-test on a python test_x.py file I have opened on a remote machine with TRAMP.
Some parameters:
There is a python virtual env in the (remote machine's) ...
0
votes
0
answers
62
views
When elpy-shell-send-region-or-buffer finishes, source buffer closes
And the first thing I do is to reopen the file.
elpy-shell-send-region-or-buffer is bound to C-c C-c. This sends the buffer to an ipython buffer. I've set a breakpoint with pdb.set_trace() and it ...
5
votes
1
answer
368
views
Annoying "error in process filter: Overlapping strings detected"
When editing python code with elpy, if I type a single or double quote while writing a new line of code (i.e. adding or changing a line in existing code), the UI freezes momentarily, make the bell ...
1
vote
0
answers
76
views
jedi:goto-definition overjumping the import section
I am using jedi:goto-definition to jump to function definitions.
If the function has a definiton under import it first jumps into that and I have to do second jump to the module again. Can it directly ...
0
votes
1
answer
127
views
How to restart elpy if it is not launch?
I am working with python using Emacs 26.3. My goal is to jump to definition of the function and jump back, for that I am using https://github.com/jacktasia/dumb-jump, which runs elpy-goto-definition ...
7
votes
0
answers
543
views
xref unsuccessful in python buffers: "no definition found"
The command xref-find-definitions is no longer working for me in Python buffers (with elpy-mode enabled. Its companions, such as xref-find-references, are also not working in Python buffers. ...
1
vote
0
answers
454
views
elpy-goto-definition doesn't work when jedi:goto-definition does work
After installing a fresh install of emacs on a coworkers machine, I got elpy setup with all the correct packages according to elpy-config but elpy-goto-definition always returns 'No definition found'. ...
0
votes
1
answer
137
views
How to disable multiple elpy keybindings?
There are multiple elpy keybindings that I am not using. Is there any way to unbind them?
Possible bindings that I want to disable C-c C-t, C-c C-p.
I have tried following answer Globally override key ...
3
votes
0
answers
129
views
elpy-goto-definition and virtualenv
I am having some strange problem regarding elpy-goto-definition (and some other features) and the use of virtualenvs.
Basically I have two different virtualenvs, in one of them elpy-goto-definition ...
1
vote
1
answer
310
views
How can I evaluate a Python buffer, switch to it, see its results, then switch back?
Suppose, we have a buffer with Python code in it. I want to evaluate it, switch to Python buffer and see the results. Then easily switch back to code buffer.
I tried the following:
(defun my-python-...
1
vote
1
answer
3k
views
How to fix: [Suspicious state from syntax checker python-mypy: Flycheck checker python-mypy returned 2, but its output contained no errors]
I keep having following warning message, even I have the recent version of python-mypy not sure why this warning message is generated; is there any way to fix this:
Suspicious state from syntax ...
0
votes
1
answer
355
views
Elpy shell-send-region to a particular named Python buffer
I often open up interactive python sessions particular to the project that I'm working on, and will use M-x rename-buffer to title them *Python[Project1]*, Python[Project2]`, etc.
I would like to ...
1
vote
2
answers
843
views
Symbol's function definition is void: rx-let
Whenever I try to use elpy, or even just fontlock (with elpy disabled) in a python file, I get the error that rx-let is void.
This is what I got from --debug-init:
Debugger entered--Lisp error: (void-...
0
votes
2
answers
371
views
elpy flymake does not recognize local .pylintrc
I have the following in the project root for my .pylintrc:
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=1000
# String used as indentation unit. This is usually " ...