Emacs Python 自动补全--Elpy


安装方法:

首先,安装一些依赖包:

# 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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM