安装方法:
首先,安装一些依赖包:
# Either of these
pip install rope
pip install jedi
# flake8 用来检查语法错误
pip install flake8
# importmagic 用来自动引入需要的包
pip install importmagic
# autopep8 用来检查PEP8规范
pip install autopep8
# yapf 用来格式化代码
pip install yapf
然后,在你的Home目录下,创建一个.emacs文件,并写入如下内容:
(require 'package)
(add-to-list 'package-archives
'("elpy" . "https://jorgenschaefer.github.io/packages/"))
打开emacs运行 M-x package-refresh-contents
加载新的库,然后运行M-x package-install RET elpy RET
(RET即回车键)安装elpy
最后,把下边的内容添加到.emacs文件中
(package-initialize)
(elpy-enable)
完成。
Reference:
https://github.com/jorgenschaefer/elpy
https://realpython.com/blog/python/emacs-the-best-python-editor/
http://codingpy.com/article/emacs-the-best-python-editor/
https://www.emacswiki.org/emacs?action=browse;oldid=PythonMode;id=PythonProgrammingInEmacs#toc2
https://elpy.readthedocs.io/en/latest/introduction.html#installation