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, per elpy
's manual,
(use-package elpy
:ensure t
:init
(elpy-enable))
to my init file.
Next, I opened a Python file and I got this message
error in process sentinel: elpy-promise-reject: peculiar error: "exited abnormally with code 1"
error in process sentinel: peculiar error: "exited abnormally with code 1"
At this point I turned on debug on error, and promptly I got this backtrace
Debugger entered--Lisp error: (process-sentinel "exited abnormally with code 1")
elpy-rpc--default-error-callback((process-sentinel "exited abnormally with code 1"))
elpy-promise-reject([*elpy-promise* #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_30> elpy-rpc--default-error-callback #<buffer *elpy-rpc [project:~/Documents/Code/ environment:/usr]*> nil] (process-sentinel "exited abnormally with code 1"))
#f(compiled-function (call-id promise) #<bytecode 0x15ab78ddb8c11359>)(1 [*elpy-promise* #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_30> elpy-rpc--default-error-callback #<buffer *elpy-rpc [project:~/Documents/Code/ environment:/usr]*> nil])
elpy-rpc--sentinel(#<process *elpy-rpc [project:~/Documents/Code/ environment:/usr]*> "exited abnormally with code 1\n")
How can I solve this issue?
Followup to Drew's comment (TL;DR it's not an interference from other packages).
I started Emacs with
emacs -Q
I evaluated
(require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (package-initialize)
;; If there are no archived package contents, refresh them (when (not package-archive-contents) (package-refresh-contents)) (use-package elpy :ensure t :init (elpy-enable))
I opened a Pyton source code file, and I've experienced the same behaviour described above.
elpy-rpc-python-command
), and find out what it means when it exits with error code 1. Then you’ll know what the problem is and how to fix it. – db48x Nov 12 '22 at 19:52emacs -Q
? If so, bisect your init file to find the culprit. If not, report a bug to the Elpy maintainer. – Drew Nov 12 '22 at 21:41