我对 Python 和 Emacs 相当陌生,并尝试使用 MELP 设置 jedi 插件。当它运行 pip 时,它似乎在与 sexpdata 作斗争。我认为问题可能源于sexpdata。我尝试将其安装在 jedi 设置的 pip 中,但在设置 Wheel 时出现错误。然而,我能够将它安装在 venv 上,但不确定如何让 jedi 使用它,或者是否可以修复它。我使用 endeavourOS 并且能够在我的 MacBook 上安装它,没有任何问题。我尝试删除 ~/.emacs/elpa/jedi* 文件夹并重新安装插件,但无济于事。任何建议将不胜感激!
运行 jedi:install:server
Running: pip install --upgrade /home/name/.emacs.d/elpa/jedi-core-20210503.1315/...Done
deferred error : (error "Deferred process exited abnormally:
command: /home/name/.emacs.d/.python-environments/default/bin/pip
exit status: exit 1
event: exited abnormally with code 1
note: This error originates from a subprocess, and is likely not a problem with pip.
来自 pip sexpdata 的错误:
Collecting sexpdata>=0.0.3 (from epc>=0.0.4->jediepcserver==0.3.0)
Using cached sexpdata-1.0.1.tar.gz (8.6 kB)
Installing build dependencies ... [?25l- \\\\ | / - done
[?25h Getting requirements to build wheel ... [?25l- error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [78 lines of output]
另一个错误:
File \\\"/tmp/pip-build-env-fhs0pp5v/overlay/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py\\\", line 183, in _license
_set_config(dist, \\\"license\\\", val[\\\"text\\\"])
~~~^^^^^^^^
KeyError: 'text'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
$ deactivate
$ sudo apt install python3-sexpdata
jedi:install-server
。或者,您可以直接在 shell 中运行命令来设置 jedi:
$ pip install --upgrade $HOME/.emacs.d/elpa/jedi-core-20210503.1315/