Open yinxiuqu opened 1 year ago
I had a similar problem but on a Debian machine. Maybe the following notes, can help you too.
For my problem, the "peculiar error: "exited abnormally with code 1" problem came from an inconsistent "rpc-venv" installation. Hence I already had a perfectly running Elpy installation in my system, some time ago, and wanted to re-use Elpy after a longer time. Which lead to the same error that you're describing.
After multiple unsuccessful complete reinstallations, I was able to understand the following:
.el
files but also automatically pull a Python package to: ~/.emacs.d/elpa/elpy-20220922.2253/elpy/
(at least on my system)rpc-venv
package/code will be installed too. On my system this goes to: .emacs.d/elpy/rpc-venv/
Apparently, due to a change in my system's default Python environment (going from 3.10.xx to 3.11.xx) the installed for rpc-venv
stopped working properly in my environment.
Hard fix that got me working again:
elpy
Emacs package via Emacs' package managerrpc-venv
is removed (I removed it manually from above mentioned path)elpy
freshly via Emacsrpc-venv
installationJust as general remark: Since, nowadays, we have a shitload of simultaneous alternatives to install packages into a system (via Pypy, apt, Emacs package manager and whatnot) that greatly overlap and create massive inconsistencies, we should start documenting more thoroughly when something may or may not get autopulled into the system.
In my case (setq elpy-rpc-python-command "python")
worked on a Ubuntu machine.
elpy probably needs some code to detect when the venv is pointing to an uninstalled python version, and regenerate the venv for the new python
I had a similar problem but on a Debian machine. Maybe the following notes, can help you too.
For my problem, the "peculiar error: "exited abnormally with code 1" problem came from an inconsistent "rpc-venv" installation. Hence I already had a perfectly running Elpy installation in my system, some time ago, and wanted to re-use Elpy after a longer time. Which lead to the same error that you're describing.
After multiple unsuccessful complete reinstallations, I was able to understand the following:
* Using Emacs' package manager to install Elpy from Melpa will result not only result in an installation of `.el` files but also _automatically_ pull a Python package to: `~/.emacs.d/elpa/elpy-20220922.2253/elpy/` (at least on my system) * In addition to this, on the very first installation, `rpc-venv` package/code will be installed too. On my system this goes to: `.emacs.d/elpy/rpc-venv/`
Apparently, due to a change in my system's default Python environment (going from 3.10.xx to 3.11.xx) the installed for
rpc-venv
stopped working properly in my environment.Hard fix that got me working again:
1. Remove `elpy` Emacs package via Emacs' package manager 2. Close that Emacs session 3. Verify that also `rpc-venv` is removed (I removed it manually from above mentioned path) 4. Re-install `elpy` freshly via Emacs 5. This causes for me also to pull a fresh `rpc-venv` installation
Just as general remark: Since, nowadays, we have a shitload of simultaneous alternatives to install packages into a system (via Pypy, apt, Emacs package manager and whatnot) that greatly overlap and create massive inconsistencies, we should start documenting more thoroughly when something may or may not get autopulled into the system.
I can confirm that this also worked for me. Deleted elpy, deleted the elpy directory then restarted emacs. After opening a Python file it asked if I wanted to install the rpc dependencies, I said yes and now the errors are gone.
I am using use-package
with the emacs-app
MacPorts package. I just upgraded to Ventura 13.4 yesterday and I just had to upgrade MacPorts (and all its packages), rm -fR ~/.emacs.d/elpy
, and restart Emacs to get this message to stop showing up. In my case, I did not have to remove and reinstall either the elpy
or rpc-venv
packages from Emacs.
Summary
Thank you for reporting to Elpy !
Here is a template to help you do it so your issue can be fixed as soon as possible. Please replace this paragraph with a summary of your issue and fill the next sections.
Steps to reproduce
error in process sentinel: elpy-rpc--default-error-callback: peculiar error: "exited abnormally with code 1" error in process sentinel: peculiar error: "exited abnormally with code 1"
My configuration
OS
debian11
Result of
(elpy-config)
Elpy configuration in my init.el