Skip to main content

Questions tagged [python]

use for Python programming language in Emacs. Emacs supports several versions of the language implementation, versions, and coding styles. Python questions should augment with additional tags as appropriate as described in the description below.

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

Python package installation and pyvenv

I use pyvenv to create new environments and activate them. I, sometimes, use libs that are not in standard lib, and I usually have to install them with pip3 module/command. For example, to install ...
david's user avatar
  • 285
0 votes
1 answer
79 views

How to enable jupyter-python for org mode in Doom?

I just installed emacs 29.1 on Linux Mint. Then I downloaded and installed Doom - which seems to be operating properly. How do I enable Doom to run jupyter-python source blocks in an org document? I ...
Mike's user avatar
  • 1
1 vote
1 answer
74 views

TextIOWrapper error when trying to pass strings between Python session code blocks

This worked seamlessly, but at some point, I lost the ability to pass string-type variable values between code blocks in Org Babel. Let’s take the following example: #+begin_src python :session *PY* :...
martinoidar's user avatar
2 votes
1 answer
71 views

Enabling flake8 and pylint to work with lsp-mode mode in my init file

Before installing LSP, flycheck had no problem running flake8 and pylint. According to this Reddit thread this is should be possible, but I'm having no luck. LSP is enabled in my init file pretty ...
Dmitri's user avatar
  • 148
0 votes
0 answers
28 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 ...
swissy's user avatar
  • 107
0 votes
0 answers
37 views

python shell complete not working

To reproduce, in an inferior-python shell, type "a=[0,1]; a[0].[tab]", here [tab] means the tab key, no completion. In a terminal, the above procedure will pop up a completion list. (python-...
godblessfq's user avatar
  • 1,299
0 votes
1 answer
223 views

Indenting Python multiline argument lists like Black/Ruff

I want to configure Emacs to indent multiline argument lists in Python like Black or Ruff (4 spaces before each argument), but Emacs is very insistent on following PEP-8 (8 spaces). Even if I manually ...
goodmami's user avatar
  • 133
1 vote
1 answer
508 views

Why doesn't my emacs use lsp-pyright?

I've desperately been trying to use the lsp-pyright server, but Emacs doesn't seem to recognize that it's installed... What I did: Configured it like described in the docs: (use-package lsp-pyright :...
Markus Grunwald's user avatar
1 vote
0 answers
49 views

Python command works in term but doesn't in eshell

I'm trying to run a python script using selenium (that should call the executable geckodriver, installed) but, while the script runs in term, it errors in eshell (and in the python console). A minimal ...
Piripuz's user avatar
  • 11
0 votes
1 answer
165 views

Defining bindings for python(-ts)-mode fails mysteriously

Setting up bindings for Python Mode (and its Tree Sitter variant) with the following use-package form mysteriously fails: (use-package python :bind (:map python-mode-map ("C-x *&...
bci_'s user avatar
  • 33
1 vote
0 answers
25 views

Output from evaluating python source code blocks in org-mode not correct [duplicate]

After switching to Mac from Windows, the output of my python org-mode code blocks are not working properly. It keeps printing what seems to be the backend python call instead of the code output. And ...
Chris's user avatar
  • 11
0 votes
1 answer
55 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. ...
Kabira  K's user avatar
  • 105
0 votes
0 answers
96 views

how to configure and use dumb-jump

I have following in my init.el file: (use-package dumb-jump :straight t :init ) (add-hook 'xref-backend-functions #'dumb-jump-xref-activate) (setq xref-show-definitions-function #'xref-show-...
Kabira  K's user avatar
  • 105
2 votes
1 answer
347 views

debugging python code

I've mostly used R with ESS before, but now I'm using python for a data sciency project. My general workflow is having a split screen with code on one side and the shell on the other (I generally don'...
swhalemwo's user avatar
0 votes
0 answers
123 views

How can I use lsp-docker with pylsp or pyright?

For the life of me, I cannot get lsp-docker to work. My goal is to use lsp-docker with lsp-pyright and ruff server, but I'd be happy with just pyright or pylsp. I can always run ruff with flymake. The ...
benwiz's user avatar
  • 101

15 30 50 per page
1
2 3 4 5
43