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.

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

Resources:

64 questions
1
vote
0 answers

Org-babel does not print results from Anaconda in src block

I need some help to configure properly anaconda to run python3 code inside org-mode files with babel. Somehow when I try to run code from libraries in Anaconda, babel does not recognize it. Here is the results that I get from the code run in…
1
vote
0 answers

How to get environment variables in Emacs Elpy Python shell using Pipenv?

I am using Elpy on Emacs and using pipenv. When I start an Elpy Python shell or send the current buffer to the shell, I cannot get the environment variables that I set in the terminal. But I would very much like to be able to send my code and…
1
vote
2 answers

Python 3 script using relative imports on standard input gives error: No module named '__main__.XXX'; '__main__' is not a package

Python 3 script using relative imports on standard input gives error: No module named 'main.XXX'; 'main' is not a package If I have a Python 3 script that uses a relative import statement of the form from .subscript2 import subfunc2 And some other…
bgoodr
  • 2,744
  • 1
  • 30
  • 51
1
vote
1 answer

Emacs Elpy doesn't find packages

First of all, please excuse me if my question is stupid. However, I cannot solve the problem that I am getting. I am going to begin a project on Python and wanted to use Emacs as default editor. I would like to first set up my environment in order…
Theo
  • 11
  • 5
1
vote
1 answer

using matplotlib from ipython session in emacs on windows

*** Update: the problem is with running python inside emacs on windows. ipython and elpy are off the hook. From a plain DOS prompt: python; from pylab import *; figure(1); show() works. If I start (windows-native) emacs with emacs -Q (turn off…
D Strozzi
  • 150
  • 1
  • 11
1
vote
2 answers

How to find available arguments python built in classes via Emacs (elpy)

When I use emacs with elpy, just about every time I start writing code for function by typing: foo_func( I automatically get on the bottom window: :container.foo_func(x, y, z=None) But when I attempt on built-in type like enumerate or…
user6273920
  • 713
  • 1
  • 7
  • 16
1
vote
0 answers

Wrong line in error message of elpy ipython

I get wrong line in the error message when I use Elpy in emacs (interpreter: ipython). This happens when I select part of my code and use ctrl-c-c to run it in elpy. The error message shows the wrong content. For example: import numpy as np a =…
1
vote
2 answers

Parenthesis edit in emacs for python

I am using the elpy package on emacs for using python. Is there a possibility to have something like Paredit to close parentheses and brackets for python?
user4813927
1
vote
1 answer

Emacs elpy and web2py

I have setup Python code completion by installing elpy from Melpa, and it seem to work (mostly) as advertised. However I want it to also complete the web2py API, and I figured the best way to achieve this is to use the web2py shell, instead of the…
Chen Levy
  • 15,438
  • 17
  • 74
  • 92
1
vote
0 answers

Define main file to always be run on C-c C-c in emacs elpy

When I am working on a file in my application in emacs/elpy, I always have to jump back into my main file buffer and do C-u C-c C-c (i.e. ) in order to run and debug it in the python shell. This is rather time consuming, so I was wondering, how can…
Perry
  • 1,709
  • 1
  • 17
  • 25
0
votes
1 answer

Disable auto completion of python code in emacs with elpy

I am new to using elpy, an emacs package for working with Python. I am not a fan of auto-complete in general, and the YAsnippet tool elpy uses in particular. How can I disable it? I found on the web I should do (delete 'elpy-module-yasnippet…
D Strozzi
  • 150
  • 1
  • 11
0
votes
1 answer

Elpy-rpc in Emacs gives 'exited abnormally with code 1' error and unexpected output. How can I fix it?

emacs elpy-20230402.1946 started giving me strange errors relating to its elpy-rpc: "error in process sentinel: elpy-rpc--default-error-callback: peculiar error: "exited abnormally with code 1" And this cryptic error message: Output from…
0
votes
0 answers

emacs cannot display polars dataframes

When I try to print a DataFrame in emacs (python & elpy enviroment), I get the following error message: UnicodeEncodeError: 'charmap' codec can't encode characters in position 15-27: character maps to Here is a minimal example where the…
Nobody-86
  • 151
  • 5
0
votes
0 answers

elpy: is it possible to send code from help to python buffer

the elpy docs describe C-c C-d to call help and it dumps the help in a buffer. Is it possible to send lines from that to the python buffer? For example, if I see >>> d = {'a': 1, 'b': 2, 'c': 3} >>> ser = pd.Series(data=d, index=['a', 'b', 'c']) >>>…
Stephen
  • 550
  • 1
  • 4
  • 15
0
votes
1 answer

Emacs elpy : How to view a list of all (global) variables and class attributes in the current buffer?

I use elpy in emacs for Python development. If I enter the command C-C C-o I'll be able to view all defined functions, classes and methods in the current buffer. But I don't see any of class attributes and defined (global) variables. Is there any…
user17911
  • 1,073
  • 1
  • 8
  • 18