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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
46 views

elpy can't find new python version (upgraded from 3.9 to 3.11)

I've upgraded from python 3.9 to 3.11 on my windows machine (on that I don't have admin rights). I used emacs (elpy) before to manage my python projects. Unfortunately, after the upgrade it seems elpy ...
swissy's user avatar
  • 77
0 votes
1 answer
31 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 ...
mhucka's user avatar
  • 163
0 votes
0 answers
30 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), ...
mhucka's user avatar
  • 163
3 votes
5 answers
154 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 ...
Ricardo's user avatar
  • 131
0 votes
1 answer
116 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 ...
erpreciso's user avatar
0 votes
1 answer
32 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 ...
Paul Weibert's user avatar
3 votes
2 answers
106 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 ...
Adelita's user avatar
  • 155
1 vote
0 answers
106 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? ...
Schach21's user avatar
3 votes
0 answers
129 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, ...
gboffi's user avatar
  • 594
0 votes
1 answer
386 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 ...
pauljohn32's user avatar
2 votes
0 answers
74 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 "...
simo hauml's user avatar
6 votes
1 answer
2k 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 ...
swissy's user avatar
  • 77
1 vote
1 answer
443 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&...
Bussller's user avatar
  • 115
0 votes
1 answer
1k 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 ...
Stephen Summering's user avatar
1 vote
2 answers
149 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 ...
Qohelet's user avatar
  • 185
2 votes
1 answer
565 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, ...
Qohelet's user avatar
  • 185
2 votes
0 answers
114 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 ...
moserandi's user avatar
0 votes
1 answer
179 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,...
mhucka's user avatar
  • 163
2 votes
1 answer
152 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 ...
buhtz's user avatar
  • 689
0 votes
1 answer
29 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") ...
mon's user avatar
  • 101
0 votes
0 answers
120 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 ...
Schach21's user avatar
0 votes
2 answers
239 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 ...
mark leeds's user avatar
1 vote
2 answers
86 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 ...
ygtozc's user avatar
  • 53
0 votes
0 answers
100 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. ...
ygtozc's user avatar
  • 53
1 vote
1 answer
57 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 ...
Levin Magruder's user avatar
1 vote
0 answers
82 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 ...
buhtz's user avatar
  • 689
1 vote
1 answer
161 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 ...
Wuff's user avatar
  • 185
1 vote
1 answer
108 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 ...
buhtz's user avatar
  • 689
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 ...
buhtz's user avatar
  • 689
0 votes
0 answers
35 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 ...
Robe's user avatar
  • 125
1 vote
1 answer
162 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, ...
Mittenchops's user avatar
0 votes
1 answer
164 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) ...
Mittenchops's user avatar
0 votes
0 answers
50 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 ...
patfla's user avatar
  • 11
5 votes
1 answer
261 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 ...
Paul Coccoli's user avatar
1 vote
0 answers
64 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 ...
alper's user avatar
  • 1,238
0 votes
1 answer
89 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 ...
alper's user avatar
  • 1,238
7 votes
0 answers
466 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. ...
bashfuloctopus's user avatar
1 vote
0 answers
374 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'. ...
Silfheed's user avatar
  • 201
0 votes
1 answer
94 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 ...
alper's user avatar
  • 1,238
3 votes
0 answers
115 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 ...
pgaluzio's user avatar
1 vote
1 answer
202 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-...
user4035's user avatar
  • 1,049
1 vote
1 answer
1k 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 ...
alper's user avatar
  • 1,238
0 votes
1 answer
279 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 ...
Mittenchops's user avatar
1 vote
2 answers
705 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-...
Benjamin Philip's user avatar
0 votes
2 answers
296 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 " ...
Mittenchops's user avatar
0 votes
1 answer
92 views

Realgud to default to my most recent python executable

When I run realgud for python debugging, with: M-x realgud:pdb I see this prompt: Run pdb (like this): python -m pdb /home/username/work/place/scratch.py I'm using a conda environment installed in ./...
Mittenchops's user avatar
0 votes
3 answers
316 views

elpy (and evil-mode) do not react on TAB

This is my elpy-config 1Elpy Configuration 2 ...
buhtz's user avatar
  • 689
1 vote
3 answers
501 views

Elpy can not find flake8 on Windows 10

My elpy package tells me that it can not find the command "flake8" on a Windows 10 machine. Ok, it make a bit sense to me. By default there is no flake8 on Windows 10 installed. I was not ...
buhtz's user avatar
  • 689
0 votes
0 answers
211 views

Unable to install ElPy: "eval-buffer: Cannot open load file: No such file or directory, s"

I followed the instructions to install ElPy from source: I cloned the repo to ~/code/elpy and added these to the Emacs initialization file: (add-to-list 'load-path "~/code/elpy") (load "...
miguelmorin's user avatar
  • 1,761
2 votes
1 answer
842 views

How to set python indent offset to 2 spaces in elpy emacs?

I use elpy package for Python 3 in Emacs. It uses yapf to format a Python buffer. I have tried about everything, setting tab-width to 2 and setting python-indent-offset to 2 but nothing makes it so ...
scribe's user avatar
  • 950