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
2 votes
1 answer
142 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 ...
user avatar
  • 35
0 votes
1 answer
33 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&...
user avatar
  • 105
0 votes
1 answer
51 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 ...
user avatar
1 vote
2 answers
68 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 ...
user avatar
  • 163
0 votes
0 answers
94 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, ...
user avatar
  • 163
1 vote
0 answers
59 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 ...
user avatar
0 votes
1 answer
39 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,...
user avatar
  • 143
0 votes
0 answers
13 views

Elpy-shell-send-region-or-buffer fails on tabify

I'm using elpy for python development, and have elpy-shell-send-region-or-buffer bound to C-c C-c. However, when I execute this, it fails to send and I have this error in my logs: elpy-shell--string-...
user avatar
0 votes
0 answers
10 views

Using elpy test runner to run next larger test aggregation?

I'm using emacs 26.1 with elpy 1.35 to run my django tests. If I put point in a test and do c-c c-t (elpy-test), it runs, for example: [...]/manage.py test --noinput my_test_file.FooTest.test_bar ...
user avatar
  • 101
1 vote
1 answer
56 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 ...
user avatar
  • 569
0 votes
0 answers
30 views

Elpy can't find py.test, even though it's available

I'm using elpy for python development. I run C-c C-t to run a single test, and I get: -*- mode: compilation; default-directory: "~/wrk/mydat/" -*- Compilation started at Fri Jan 28 17:50:10 ...
user avatar
0 votes
1 answer
17 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") ...
user avatar
  • 101
0 votes
0 answers
18 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 ...
user avatar
0 votes
0 answers
56 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 ...
user avatar
0 votes
0 answers
317 views

Setting elpy with python 3.10

I was trying to setup elpy with python 3.10 and get the following error: Elpy Configuration Emacs.............: 27.2 Elpy..............: Not found (Python), 1.35.0 (Emacs Lisp) Virtualenv........: ...
user avatar
0 votes
2 answers
148 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 ...
user avatar
0 votes
0 answers
34 views

How to disable highlight-indentation-mode in elpy/Python

I use elpy with Python files. The indention is shown with vertical bars. I do not want them and know that I can disable them with highlight-indentation-mode. Doing this explicite with M-x in the ...
user avatar
  • 569
1 vote
2 answers
46 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 ...
user avatar
  • 53
0 votes
0 answers
46 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. ...
user avatar
  • 53
1 vote
1 answer
44 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 ...
user avatar
1 vote
0 answers
42 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 ...
user avatar
  • 569
1 vote
1 answer
88 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 ...
user avatar
  • 75
0 votes
0 answers
78 views

elpy fails with rpc-venv

When I try to use elpy, I get an error message regarding: Running 'python -m venv /home/acb/.emacs.d/elpy/rpc-venv': Error: Command '['/home/acb/.emacs.d/elpy/rpc-venv/bin/python', '-Im', 'ensurepip',...
user avatar
  • 131
0 votes
1 answer
56 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 ...
user avatar
  • 569
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 ...
user avatar
  • 569
0 votes
0 answers
28 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 ...
user avatar
  • 125
1 vote
0 answers
65 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, ...
user avatar
0 votes
1 answer
106 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) ...
user avatar
0 votes
0 answers
39 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 ...
user avatar
  • 11
5 votes
1 answer
163 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 ...
user avatar
1 vote
0 answers
61 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 ...
user avatar
  • 1,078
0 votes
1 answer
57 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 ...
user avatar
  • 1,078
6 votes
0 answers
337 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. ...
user avatar
1 vote
0 answers
305 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'. ...
user avatar
  • 161
0 votes
1 answer
68 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 ...
user avatar
  • 1,078
3 votes
0 answers
97 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 ...
user avatar
0 votes
1 answer
128 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-...
user avatar
  • 857
1 vote
1 answer
730 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 ...
user avatar
  • 1,078
0 votes
1 answer
179 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 ...
user avatar
1 vote
2 answers
545 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-...
user avatar
0 votes
2 answers
244 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 " ...
user avatar
0 votes
1 answer
65 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 ./...
user avatar
0 votes
3 answers
237 views

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

This is my elpy-config 1Elpy Configuration 2 ...
user avatar
  • 569
1 vote
3 answers
321 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 ...
user avatar
  • 569
0 votes
0 answers
138 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 "...
user avatar
  • 1,533
1 vote
1 answer
557 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 ...
user avatar
  • 765
1 vote
0 answers
369 views

Flymake stopped working with elpy...no idea what I did or didn't do [Windows]

I installed elpy, along with jedi, rope and got it to work briefly yesterday after uninstalling python and reinstalling it with anaconda and setting the environment variable to path. I tinkered around ...
user avatar
  • 43
3 votes
1 answer
2k views

Elpy Configuration...Setting Up a Virtual Environment and Pip Conflic with Conda? Need hand holding

Full disclosure: I installed anaconda and set it to the path variable. After I did this I was able to access elpy-config which I was not able to (see my prior question). I still pretty much have no ...
user avatar
  • 43
0 votes
0 answers
34 views

Why Jupyter console sometimes decide to output sometimes don't?

Problem I don't know why my Jupyter console sometimes doesn't output anything. An example is this: Notice that only the first line gets its output. I use C-enter to execute each line. Line 2, 3, 4, ...
user avatar
1 vote
0 answers
72 views

How to run current buffer as python module from project root in Elpy mode?

Take for example I have the following project tree. repo | +-root | +-__init__.py +-__main__.py +-packageA | +-__init__.py +-__main__.py My buffer is currently at root.packageA....
user avatar
  • 288