安裝方法:
首先,安裝一些依賴包:
# 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